/* assets/style.css */

/* General Body and Container Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #eef2f5; /* Lighter background */
    margin: 0;
    padding: 20px;
    color: #333;
    line-height: 1.6;
    display: flex; /* For centering content */
    justify-content: center;
    align-items: flex-start; /* Align to top, not center vertically */
    min-height: 100vh; /* Ensure body takes full viewport height */
}

.container {
    width: 100%;
    max-width: 960px; /* Increased max-width for better content display */
    margin: 20px auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); /* More pronounced shadow */
    box-sizing: border-box; /* Include padding in width */
}

/* Header and Navigation */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0; /* Softer border */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 2em; /* Slightly larger heading */
}

.nav-links {
    display: flex;
    gap: 15px; /* Spacing between links */
    flex-wrap: wrap;
    margin-top: 5px; /* Adjust for wrapping */
}

.nav-links a {
    text-decoration: none;
    color: #3498db;
    font-weight: bold;
    padding: 8px 12px; /* Add padding for better clickability */
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links a:hover {
    background-color: #3498db;
    color: white;
}

/* Form Elements */
.form-group {
    margin-bottom: 18px; /* Increased spacing */
}

label {
    display: block;
    margin-bottom: 8px; /* Increased spacing */
    font-weight: bold;
    color: #555;
    font-size: 0.95em;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
select,
textarea { /* Added textarea for future use */
    width: calc(100% - 22px); /* Account for padding and border */
    padding: 12px;
    margin-top: 5px;
    border: 1px solid #ccc; /* Lighter border */
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); /* Focus ring effect */
    outline: none;
}

/* Buttons */
button, .button {
    background-color: #3498db;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
}

button:hover, .button:hover {
    background-color: #2980b9;
    transform: translateY(-2px); /* More noticeable lift */
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.3);
}

button:active, .button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.2);
}

.button.secondary {
    background-color: #95a5a6;
    box-shadow: 0 4px 10px rgba(149, 165, 166, 0.2);
}

.button.secondary:hover {
    background-color: #7f8c8d;
    box-shadow: 0 6px 15px rgba(149, 165, 166, 0.3);
}

.button-group {
    margin-top: 25px;
    display: flex;
    gap: 15px; /* Increased gap */
    flex-wrap: wrap;
    justify-content: flex-start; /* Align buttons to the start */
}

/* Alerts */
.alert {
    padding: 18px; /* More padding */
    margin-bottom: 25px; /* More margin */
    border-radius: 8px;
    font-weight: bold;
    border: 1px solid transparent;
    animation: fadeIn 0.5s ease-out; /* Fade-in animation */
}

.alert-success {
    background-color: #e6ffed; /* Lighter green */
    color: #1a7e32; /* Darker green text */
    border-color: #b8f2c8;
}

.alert-error {
    background-color: #ffe6e6; /* Lighter red */
    color: #a02020; /* Darker red text */
    border-color: #f2b8b8;
}

.alert-info {
    background-color: #e6f7ff; /* Lighter blue */
    color: #1d6fa5; /* Darker blue text */
    border-color: #b8e2f2;
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate; /* Use separate for rounded corners on cells */
    border-spacing: 0;
    margin-top: 25px;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden; /* Ensures rounded corners apply to content */
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

th, td {
    padding: 15px 20px; /* More padding */
    text-align: left;
    border-bottom: 1px solid #f0f0f0; /* Lighter border */
}

th {
    background-color: #f8fbfd; /* Very light blue-gray */
    color: #555;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85em; /* Slightly smaller font for headers */
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background-color: #f5f8fa; /* Subtle hover effect */
    cursor: pointer; /* Indicate row is clickable/interactive */
}

/* Specific styles for Telegram linking */
.telegram-link-section {
    background-color: #f0f4f7; /* Slightly darker than body background */
    padding: 25px;
    border-radius: 10px;
    margin-top: 35px;
    border: 1px solid #dbe2e8;
}

.telegram-link-section h3 {
    color: #34495e;
    margin-top: 0;
}

.telegram-link-section p {
    margin-bottom: 12px;
}

.telegram-link-code {
    font-size: 1.3em; /* Larger code */
    font-weight: bold;
    color: #e74c3c;
    background-color: #fdfefe;
    padding: 12px 20px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 15px;
    margin-bottom: 15px; /* Added margin */
    border: 1px dashed #c0392b;
    user-select: all; /* Allow easy selection */
    cursor: copy; /* Indicate it can be copied */
}

.telegram-link-code:active {
    transform: scale(0.98); /* Subtle press effect */
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
    padding-top: 50px; /* Space from top */
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    position: relative;
    animation: slideInTop 0.4s ease-out;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInTop {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 20px;
        margin: 10px auto;
        border-radius: 8px;
    }
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .header h1 {
        font-size: 1.8em;
    }
    .nav-links {
        width: 100%;
        justify-content: center;
        margin-top: 15px;
    }
    .nav-links a {
        padding: 6px 10px;
        font-size: 0.9em;
    }
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="date"],
    select,
    textarea {
        width: 100%;
        padding: 10px;
        font-size: 0.95em;
    }
    button, .button {
        width: 100%;
        padding: 10px 15px;
        font-size: 0.95em;
    }
    .button-group {
        flex-direction: column;
        gap: 10px;
    }
    table, thead, tbody, th, td, tr {
        display: block;
    }
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    tr {
        border: 1px solid #eee;
        margin-bottom: 15px;
        border-radius: 8px;
        overflow: hidden;
    }
    td {
        border: none;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }
    td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-left: 15px;
        font-weight: bold;
        text-align: left;
        white-space: nowrap;
    }
    .telegram-link-code {
        font-size: 1.1em;
        padding: 10px 15px;
    }
    .modal-content {
        padding: 20px;
    }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 800px;
        padding: 25px;
    }
    th, td {
        padding: 12px 18px;
    }
}
