/* FresedAPI Dashboard - Dark Theme */

:root {
    --primary-color: #121212;
    --secondary-color: #1e1e1e;
    --accent-color: #6c5ce7;
    --accent-light: #a29bfe;
    --text-color: #ffffff;
    --text-muted: #b3b3b3;
    --card-bg: #2d2d2d;
    --hover-color: #3d3d3d;
    --success-color: #00d68f;
    --warning-color: #ffcc00;
    --danger-color: #ff5757;
    --border-radius: 16px;
    --card-radius: 20px;
    --button-radius: 30px;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --gradient-1: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --gradient-2: linear-gradient(135deg, #00d68f, #4cd4a9);
    --gradient-warning: linear-gradient(135deg, #ffcc00, #ffda6a);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.d-none {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--button-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    font-size: 1rem;
    border: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--text-color);
    box-shadow: 0 6px 15px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background: rgba(108, 92, 231, 0.1);
    transform: translateY(-3px);
}

.btn-light {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-light:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Navigation */
.navbar {
    background-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-decoration: none;
    color: var(--text-color);
}

.logo h1 span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover i,
.nav-links a.active i {
    transform: translateY(-2px);
    color: var(--accent-color);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-color);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.auth-buttons a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.auth-buttons a i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.auth-buttons a:hover i {
    transform: translateY(-2px);
}

/* Containers */
.container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.dashboard-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    flex: 1;
}

.dashboard-section {
    margin-bottom: 3rem;
    animation: fadeIn 0.5s ease;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
}

/* Loading Animation */
.loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 5rem 0;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(108, 92, 231, 0.2);
    border-left-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error Card */
.error-card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px var(--shadow-color);
}

.error-icon {
    font-size: 3rem;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

.error-card h2 {
    margin-bottom: 1rem;
}

.error-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.error-help {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border-left: 4px solid var(--accent-color);
    text-align: left;
}

.error-help p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.error-help ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.error-help li {
    margin-bottom: 0.5rem;
}

.error-help strong {
    color: var(--accent-color);
    font-family: monospace;
    background-color: rgba(108, 92, 231, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Login Card */
.login-card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 2rem;
    box-shadow: 0 10px 30px var(--shadow-color);
    animation: fadeInUp 0.5s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    margin-bottom: 0.5rem;
}

.login-header h2 span {
    color: var(--accent-color);
}

.login-header p {
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.api-key-input {
    position: relative;
}

.api-key-input input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.api-key-input input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--accent-light);
}

.login-footer a:hover {
    text-decoration: underline;
}

.demo-keys {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Dashboard Cards */
.welcome-card {
    background: var(--gradient-1);
    border-radius: var(--card-radius);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
}

.welcome-text h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.welcome-stats {
    display: flex;
    gap: 2rem;
}

.token-display, .date-display, .token-reset-timer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0.5rem 1rem;
    flex: 1;
    text-align: center;
    min-height: 85px;
    justify-content: center;
}

.token-display .label, .date-display .label, .token-reset-timer .label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.2rem;
}

.token-display .value, .date-display .value, .token-reset-timer .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.token-reset-timer .value {
    color: var(--text-color);
    font-family: monospace;
    letter-spacing: 1px;
}

.api-key-card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 10px 20px var(--shadow-color);
}

.api-key-card .card-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2);
}

.api-key-card .card-header h3 {
    margin: 0;
}

.api-key-container {
    padding: 1.5rem 2rem;
    background-color: rgba(0, 0, 0, 0.1);
}

.api-key-container code {
    display: block;
    font-family: monospace;
    font-size: 1.2rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: auto;
    white-space: nowrap;
}

.api-key-warning {
    padding: 1rem 2rem;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.api-key-warning i {
    color: var(--warning-color);
    margin-right: 0.5rem;
}

.grid-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 20px var(--shadow-color);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    border-radius: 50%;
    margin-right: 1.5rem;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    margin: 0 0 0.3rem 0;
}

.stat-content p {
    margin: 0;
    color: var(--text-muted);
}

.usage-chart-container {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: 0 10px 20px var(--shadow-color);
}

.usage-chart-container h3 {
    margin-bottom: 1.5rem;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Usage Section */
.date-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.date-input {
    display: flex;
    flex-direction: column;
}

.date-input label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.date-input input {
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-color);
}

.chart-card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: 0 10px 20px var(--shadow-color);
}

.chart-card h3 {
    margin-bottom: 1.5rem;
}

.data-table-card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: 0 10px 20px var(--shadow-color);
    margin-top: 2rem;
}

.data-table-card h3 {
    margin-bottom: 1.5rem;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Models Section */
.models-filter {
    display: flex;
    gap: 1rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Models Grid and Cards */
.models-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.model-card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 8px 16px var(--shadow-color);
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-top: 4px solid var(--accent-color);
}

.model-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 28px var(--shadow-color);
    border-top-color: var(--accent-light);
}

.model-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.model-name {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: var(--text-color);
    font-weight: 600;
}

.model-details {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.detail {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.context-window-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.context-window {
    color: var(--accent-light);
    font-weight: 600;
}

.model-actions {
    display: flex;
    justify-content: flex-end;
}

.copy-btn {
    background: var(--gradient-1);
    border: none;
    border-radius: var(--button-radius);
    padding: 0.8rem 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.copy-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.5);
}

/* Loading placeholder styling */
.loading-placeholder {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    gap: 1.5rem;
}

.loading-placeholder .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(108, 92, 231, 0.1);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-placeholder p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Notification for copy action */
.copy-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: var(--gradient-2);
    color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideInUp 0.3s, fadeOut 0.3s 2.5s forwards;
    font-weight: 500;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Copy button style */
.btn-copy {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-copy:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-copy i {
    font-size: 0.9rem;
}

/* Account Section */
.account-info-card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 20px var(--shadow-color);
}

.account-info-card h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.profile-form input {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-muted);
}

.profile-form input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.bg-success {
    background: var(--gradient-2);
    color: #1a1a1a;
}

.status-badge.bg-danger {
    background: linear-gradient(135deg, #ff5757, #ff8a8a);
    color: white;
}

.status-badge.bg-warning {
    background: var(--gradient-warning);
    color: #1a1a1a;
}

.user-badge {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.user-badge span:first-child {
    font-weight: 600;
}

/* Footer */
.main-footer {
    background-color: var(--secondary-color);
    padding: 3rem 0 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-logo h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.footer-logo h3 span {
    color: var(--accent-color);
}

.footer-logo p {
    color: var(--text-muted);
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Models Section Styling (new) */
.search-container {
    margin-bottom: 2rem;
    max-width: 500px;
}

.search-box {
    position: relative;
    background-color: var(--card-bg);
    border-radius: 30px;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: fadeIn 0.8s ease-out;
}

.search-box:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

.search-box input {
    background: transparent;
    border: none;
    width: 100%;
    color: var(--text-color);
    font-size: 1rem;
    padding: 0.5rem;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* Устанавливаем фиксированную разметку моделей */
.models-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* Mobile Menu Button */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-button:hover {
    background-color: rgba(108, 92, 231, 0.3);
    transform: rotate(90deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--primary-color);
    z-index: 1000;
    transition: left 0.4s ease;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.mobile-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(108, 92, 231, 0.05), transparent);
    z-index: -1;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(108, 92, 231, 0.05);
}

.mobile-menu-header .logo h1 {
    font-size: 1.8rem;
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background-color: rgba(255, 87, 87, 0.2);
    transform: rotate(90deg);
    color: #ff5757;
}

.mobile-menu-links {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu-links a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mobile-menu-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-1);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: bottom;
}

.mobile-menu-links a:hover::before,
.mobile-menu-links a.active::before {
    transform: scaleY(1);
}

.mobile-menu-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
    transform: translateY(-5px);
}

.mobile-menu-links a:hover::after,
.mobile-menu-links a.active::after {
    width: 100%;
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
    background-color: rgba(108, 92, 231, 0.1);
    color: var(--text-color);
}

.mobile-menu-links a i {
    margin-right: 1rem;
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--accent-light);
}

.mobile-menu-links a:hover i,
.mobile-menu-links a.active i {
    transform: translateY(-2px);
    color: var(--accent-color);
}

.mobile-menu-links a span {
    font-weight: 500;
}

.mobile-menu-links a.active span {
    font-weight: 600;
}

.mobile-auth-buttons {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-auth-buttons .btn {
    width: 100%;
    padding: 1rem;
}

.mobile-auth-buttons .btn-primary {
    background: var(--accent-color);
    color: var(--text-color);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.mobile-auth-buttons .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent-color), var(--accent-light));
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease;
}

.mobile-auth-buttons .btn-primary:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.mobile-auth-buttons .btn-primary:hover {
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.5);
}

.mobile-auth-buttons .btn-login {
    background: transparent;
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.mobile-auth-buttons .btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(108, 92, 231, 0.1);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease;
}

.mobile-auth-buttons .btn-login:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.mobile-auth-buttons .btn-login:hover {
    border-color: var(--accent-color);
}

/* Backdrop for mobile menu */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.backdrop.active {
    display: block;
    opacity: 1;
}

/* Media Queries для адаптивного дизайна */
@media screen and (max-width: 1200px) {
    .models-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-row {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media screen and (max-width: 992px) {
    .welcome-card {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    .welcome-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .models-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .date-filter {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .date-input {
        width: 100%;
    }
    
    .footer-links {
        gap: 2rem;
    }
}

@media screen and (max-width: 768px) {
    .nav-links, .auth-buttons {
        display: none;
    }
    
    .mobile-menu-button {
        display: flex;
    }
    
    .nav-container {
        padding: 0 1.5rem;
    }
    
    .welcome-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .token-display, .date-display, .token-reset-timer {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        align-items: center;
        text-align: left;
    }
    
    .models-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-links {
        width: 100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
}

@media screen and (max-width: 576px) {
    .container, .dashboard-container {
        padding: 1rem 0.5rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .welcome-card {
        padding: 1.5rem;
    }
    
    .welcome-text h3 {
        font-size: 1.5rem;
    }
    
    .api-key-container code {
        font-size: 0.9rem;
        white-space: pre-wrap;
        word-break: break-all;
    }
    
    .stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin: 0 auto 1rem auto;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }
    
    .mobile-menu {
        width: 85%;
    }
    
    .data-table th, .data-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    body {
        font-size: 14px;
    }
    
    .chart-wrapper {
        height: 200px;
    }
    
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    .mobile-menu-button, .mobile-menu-close {
        min-width: 44px;
        min-height: 44px;
    }
    
    .mobile-menu-links a {
        padding: 1.2rem 1.5rem;
        min-height: 44px;
    }
}

@media screen and (max-width: 375px) {
    .welcome-card {
        padding: 1rem;
    }
    
    .welcome-text h3 {
        font-size: 1.3rem;
    }
    
    .welcome-text p {
        font-size: 0.9rem;
    }
    
    .stat-content h3 {
        font-size: 1.3rem;
    }
    
    .section-header h2 {
        font-size: 1.4rem;
    }
    
    .api-key-card .card-header {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }
}

@media screen and (max-width: 768px) {
    .chart-card {
        margin-bottom: 2rem;
    }
    
    .data-table-card {
        overflow-x: hidden;
    }
    
    .dashboard-section {
        margin-bottom: 2.5rem;
    }
    
    input[type="date"], 
    input[type="text"], 
    input[type="password"] {
        font-size: 16px;
    }
    
    .date-filter .date-input input {
        width: 100%;
    }
    
    .token-display .value, 
    .date-display .value, 
    .token-reset-timer .value {
        font-size: 1.2rem;
    }
    
    #copyApiKey {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Dashboard Tabs Navigation */
.dashboard-tabs {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.tabs-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.tab-link {
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.tab-link i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.tab-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.tab-link:hover::after,
.tab-link.active::after {
    width: 100%;
}

.tab-link:hover {
    color: var(--text-color);
    background-color: rgba(108, 92, 231, 0.05);
}

.tab-link.active {
    color: var(--text-color);
    background-color: rgba(108, 92, 231, 0.1);
}

.tab-link:hover i,
.tab-link.active i {
    transform: translateY(-2px);
    color: var(--accent-color);
}

/* Media Query для адаптивности табов */
@media screen and (max-width: 768px) {
    .tabs-nav {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .tab-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Request Limit Card Styles */
.request-limit-card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 20px var(--shadow-color);
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: space-between;
    border-left: 4px solid var(--accent-color);
}

.limit-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 150px;
}

.limit-info .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.limit-info .value {
    font-size: 1.5rem;
    font-weight: 700;
}

@media screen and (max-width: 768px) {
    .request-limit-card {
        flex-direction: column;
        gap: 1rem;
    }
    
    .limit-info {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .limit-info .value {
        font-size: 1.2rem;
    }
}

/* Добавленные стили для одностраничного отображения */
.all-content-page .dashboard-section {
    margin-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
    position: relative;
}

.all-content-page .dashboard-section:last-child {
    border-bottom: none;
    margin-bottom: 20px;
}

.all-content-page .section-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 25px;
    color: #fff;
    border-left: 4px solid #6c5ce7;
    padding-left: 15px;
    position: relative;
}

.all-content-page .section-header {
    margin-bottom: 30px;
}

@media screen and (max-width: 768px) {
    .all-content-page .section-title {
        font-size: 22px;
    }
    
    .all-content-page .dashboard-section {
        margin-bottom: 30px;
        padding-bottom: 30px;
    }
} 