/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212; /* Deeper dark background */
    color: #e0e0e0;
    display: flex;
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 250px;
    background-color: #1e1e1e;
    padding: 20px;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    border-right: 1px solid #333;
}

.sidebar h2 {
    color: #00cfff; /* Sky blue */
    font-size: 26px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: bold;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 20px;
}

.sidebar ul li a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 18px;
    display: block;
    padding: 12px;
    background-color: #2a2a2a;
    border-radius: 6px;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
}

.sidebar ul li a:hover {
    background-color: #00cfff;
    color: #000;
}

/* Main Content Area */
.main-content {
    margin-left: 250px;
    padding: 30px;
    width: calc(100% - 250px);
    background-color: #181818;
    overflow-y: auto;
}

.main-content h2 {
    font-size: 28px;
    color: #00cfff;
    margin-bottom: 20px;
}

/* Dashboard Stats */
.dashboard-stats {
    margin-bottom: 30px;
    background-color: #222;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 255, 255, 0.05);
}

.dashboard-stats p {
    font-size: 18px;
    margin: 10px 0;
    color: #e0f7ff;
}

/* App Board */
.app-board {
    margin-top: 40px;
}

.app-board h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #00cfff;
}

/* App Cards */
.app-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.app-card {
    background-color: #262626;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, background-color 0.3s;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.05);
}

.app-card h4 {
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 10px;
}

.app-card p {
    color: #cccccc;
    font-size: 16px;
}

.app-card:hover {
    background-color: #2f2f2f;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.1);
}

.app-ads table {
    width: 100%;
    background-color: #2c2c2c;
    color: #f4f4f4;
    border-collapse: collapse;
    margin-top: 20px;
}

.app-ads th, .app-ads td {
    border: 1px solid #444;
    padding: 10px;
    text-align: left;
}

.app-ads th {
    background-color: #333;
    color: #00cfff;
}

/* Form Styling */
.styled-form {
    background-color: #2c2c2c;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.styled-form label {
    font-weight: bold;
    color: #00cfff;
}

.styled-form input,
.styled-form select {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #444;
    color: #f4f4f4;
    font-size: 16px;
}

.styled-form button {
    background-color: #00cfff;
    color: #000;
    font-weight: bold;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.styled-form button:hover {
    background-color: #00b0e6;
}

/* Table Styling */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #2c2c2c;
    color: #f4f4f4;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    border-radius: 8px;
    overflow: hidden;
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #444;
}

.styled-table th {
    background-color: #333;
    color: #00cfff;
    text-align: left;
}

.styled-table tr:hover {
    background-color: #3a3a3a;
}

/* Section Titles */
.ads-header h2,
.form-section h3,
.ads-table-section h3 {
    color: #00cfff;
    margin-bottom: 20px;
}

/* Login Page Styling */
.login-container {
    width: 100%;
    max-width: 400px;
    height: 400px;
    margin: 100px auto;
    padding: 30px;
    background-color: #2c2c2c;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.1);
}

.login-container h2 {
    font-size: 28px;
    color: #00cfff;
    margin-bottom: 30px;
    text-align: center;
    font-weight: bold;
}

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-container label {
    font-weight: bold;
    color: #00cfff;
}

.login-container input {
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #444;
    background-color: #444;
    color: #f4f4f4;
    font-size: 16px;
}

.login-container button {
    background-color: #00cfff;
    color: #000;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.login-container button:hover {
    background-color: #00b0e6;
}

.error-message {
    color: red;
    text-align: center;
    font-size: 16px;
}

/* Form Section Styling */
.form-section {
    margin: 30px 0;
    padding: 20px;
    background-color: #2c2c2c;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.1);
    width: 500px;
}

.styled-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.styled-form input,
.styled-form select {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #444;
    background-color: #444;
    color: #f4f4f4;
    font-size: 16px;
}

.styled-form button {
    background-color: #00cfff;
    color: #000;
    font-weight: bold;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.styled-form button:hover {
    background-color: #00b0e6;
}

/* Table Styling */
.apps-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.apps-table th,
.apps-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #555;
}

.apps-table th {
    background-color: #333;
    color: #00cfff;
}

.apps-table tr:hover {
    background-color: #2e2e2e;
}

/* Message Styling */
.success-message {
    color: #00ff99;
    font-weight: bold;
    margin-top: 10px;
}

.btn {
    display: inline-block;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.edit-btn {
    background-color: #00cfff;
}

.edit-btn:hover {
    background-color: #00b2dc;
}

.delete-btn {
    background-color: #ff5c5c;
    margin-left: 6px;
}

.delete-btn:hover {
    background-color: #e04343;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 220px;
    background-color: #181818;
    padding: 20px;
    color: #fff;
}

.sidebar-title {
    font-size: 22px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.nav-list {
    list-style: none;
}

.nav-list li {
    margin: 15px 0;
}

.nav-list a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-list a:hover,
.logout:hover {
    color: #1abc9c;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px;
}

.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-header h1 {
    margin-bottom: 20px;
    font-size: 26px;
}

.stats-cards {
    display: flex;
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #ae00ff, #6800ca);
    padding: 20px;
    flex: 1;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    height: 100px;
    width: 100px;
}

.stat-card h3 {
    margin-bottom: 10px;
    color: #ffffff;
}

.stat-card p {
    font-size: 24px;
    font-weight: bold;
    color: #2980b9;
}

/* Apps Section */
.apps-section {
    margin-top: 30px;
}

.apps-section h2 {
    margin-bottom: 20px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.app-card {
    background: linear-gradient(135deg, #6800ca, #ae00ff); /* Example gradient */
    padding: 20px;
    text-decoration: none;
    color: #fff; /* Changed for better contrast */
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.app-card h4 {
    margin-bottom: 10px;
    font-size: 18px;
}

.app-card p {
    font-size: 14px;
    color: #1abc9c;
}

/* Better layout for 16:9 landscape view */
.stats-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.stat-card {
    flex: 1 1 30%;
    max-width: 32%;
    background: linear-gradient(135deg, #ae00ff, #6800ca);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-card h3 {
    color: #ffffff;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 24px;
    font-weight: bold;
    color: #00cfff;
}

/* App grid adapts to wide screens */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Large screen tweaks (e.g. 1920x1080) */
@media screen and (min-width: 1600px) {
    .main-content {
        padding: 60px;
    }

    .sidebar {
        width: 240px;
    }

    .main-content {
        margin-left: 240px;
        width: calc(100% - 240px);
    }

    .stat-card p {
        font-size: 28px;
    }

    .apps-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}
