/* ==================== ROOT VARIABLES ==================== */
:root {
    --primary-bg: #0a0e27;
    --secondary-bg: rgba(255, 255, 255, 0.05);
    --card-bg: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent-color: #667eea;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
}

/* ==================== GLOBAL STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== COSMIC BACKGROUND ==================== */
.stars-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1429 100%);
    z-index: -1;
    overflow: hidden;
}

.stars-bg::before,
.stars-bg::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 60px 70px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 50px 50px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(2px 2px at 90px 10px, rgba(255, 255, 255, 0.7), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 5s ease-in-out infinite;
}

.stars-bg::after {
    background-size: 400px 400px;
    animation-duration: 7s;
    animation-direction: reverse;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ==================== APP CONTAINER ==================== */
.app-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-bottom: 20px;
}

/* ==================== LOADING ==================== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    position: relative;
    animation: rotate 1.5s linear infinite;
}

.spinner::before,
.spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.spinner::before {
    width: 100%;
    height: 100%;
    background: conic-gradient(
        from 0deg,
        #667eea 0deg,
        #764ba2 90deg,
        #667eea 180deg,
        transparent 180deg
    );
    animation: spin 1.5s linear infinite;
}

.spinner::after {
    width: 80%;
    height: 80%;
    background: var(--primary-bg);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loading p {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    animation: pulse 1.5s ease-in-out infinite;
    text-align: center;
    max-width: 280px;
    padding: 0 20px;
}

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

@keyframes rotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    z-index: 10;
}

.close-btn:hover {
    transform: rotate(90deg);
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-item:hover,
.sidebar-item.active {
    background: var(--secondary-bg);
    color: var(--text-primary);
    border-left-color: var(--accent-color);
}

.sidebar-item .icon {
    font-size: 24px;
}

/* ==================== OVERLAY ==================== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==================== HEADER ==================== */
.header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 40px;
    height: 40px;
    justify-content: center;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
    border-radius: 2px;
}

.hamburger:hover span {
    background: var(--accent-color);
}

.header-title {
    flex: 1;
}

.greeting {
    font-size: 20px;
    font-weight: 600;
}

#username {
    color: var(--accent-color);
}

/* ==================== PAGES ==================== */
.page {
    opacity: 1;
    transition: opacity 0.3s;
}

.page.hidden {
    display: none;
}

/* ==================== PROJECTS CONTAINER ==================== */
.projects-container {
    padding: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Projects list loader */
.projects-list-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.projects-list-loader .spinner {
    width: 50px;
    height: 50px;
    position: relative;
    animation: rotate 1.5s linear infinite;
}

.projects-list-loader .spinner::before,
.projects-list-loader .spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.projects-list-loader .spinner::before {
    width: 100%;
    height: 100%;
    background: conic-gradient(
        from 0deg,
        #667eea 0deg,
        #764ba2 90deg,
        #667eea 180deg,
        transparent 180deg
    );
    animation: spin 1.5s linear infinite;
}

.projects-list-loader .spinner::after {
    width: 80%;
    height: 80%;
    background: var(--primary-bg);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.projects-list-loader p {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    animation: pulse 1.5s ease-in-out infinite;
    text-align: center;
}

/* ==================== PROJECT CARD ==================== */
.project-card,
.project-card-detailed {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.project-card::before,
.project-card-detailed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover,
.project-card-detailed:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
}

.project-card:hover::before,
.project-card-detailed:hover::before {
    opacity: 1;
}

/* Finished project card styling */
.project-card-finished {
    border-color: rgba(96, 125, 139, 0.3) !important;
}

.project-card-finished:hover {
    box-shadow: 0 10px 30px rgba(96, 125, 139, 0.15) !important;
    border-color: rgba(96, 125, 139, 0.5) !important;
}

/* Locked project card styling */
.project-card-locked {
    border-color: rgba(244, 67, 54, 0.3) !important;
}

.project-card-locked:hover {
    transform: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
}

/* My Projects page - Total Views Display */
.project-total-views {
    text-align: center;
    padding: 15px 0;
    margin-top: 10px;
}

.total-views-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.total-views-value {
    font-size: 32px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* My Projects page - Bar Chart */
.project-chart-bar-wrapper {
    position: relative;
    margin-top: 20px;
}

.project-chart-bar {
    padding: 10px 0;
    height: 140px;
}

.project-chart-bar-wrapper .project-platforms {
    position: absolute;
    bottom: 0;
    right: 0;
}

/* Уменьшить иконки в "Мои проекты" */
.project-chart-bar-wrapper .platform-icon {
    width: 12px;
    height: 12px;
    font-size: 7px;
    border-radius: 3px;
}

.chart-legend {
    text-align: center;
    font-size: 8px;
    color: var(--text-secondary);
    margin-top: 10px;
    white-space: nowrap;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.project-header-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.project-days {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.days-icon {
    font-size: 14px;
}

.days-normal {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.days-warning {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.days-urgent {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
    animation: pulse-urgent 2s ease-in-out infinite;
}

.days-finished {
    background: rgba(96, 125, 139, 0.15);
    color: #607d8b;
    border: 1px solid rgba(96, 125, 139, 0.3);
    font-weight: 600;
}

@keyframes pulse-urgent {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.project-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.project-geo {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.project-progress-chart {
    width: 80px;
    height: 80px;
    position: relative;
}

.progress-circle {
    width: 100%;
    height: 100%;
}

.progress-text-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-percent {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-color);
}

.progress-label {
    font-size: 10px;
    color: var(--text-secondary);
}

.project-body {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
    position: relative;
    padding-bottom: 10px;
}

/* Опустить текст обновления в главной странице */
.project-body .last-update-text {
    bottom: -5px;
}

.project-chart {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.chart-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-percentage {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.chart-label {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.project-stats-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.last-update-text {
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: 8px;
    color: var(--text-secondary);
    opacity: 0.7;
    white-space: nowrap;
}

.project-platforms {
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.platform-icon {
    width: 19px;
    height: 19px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    transition: transform 0.2s;
    opacity: 0.95;
}

.platform-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-icon:hover {
    transform: scale(1.15);
    opacity: 1;
}

/* TikTok - черный с градиентом cyan/pink */
.platform-icon.tiktok {
    background: linear-gradient(135deg, #00f2ea 0%, #ff0050 100%);
}

/* Instagram - градиент от фиолетового к оранжевому */
.platform-icon.instagram {
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
}

/* YouTube - красный */
.platform-icon.youtube {
    background: #ff0000;
}

/* Facebook - синий */
.platform-icon.facebook {
    background: #1877f2;
}

/* Threads - черный */
.platform-icon.threads {
    background: #000000;
}

/* ==================== PROFILE PAGE ==================== */
.profile-container {
    padding: 20px;
}

.profile-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 600;
    margin: 0 auto 20px;
}

#profile-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

#profile-username {
    font-size: 16px;
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==================== DOWNLOAD PAGE ==================== */
.download-container {
    padding: 20px;
}

.download-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
}

.download-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.input {
    width: 100%;
    padding: 15px;
    background: var(--secondary-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input::placeholder {
    color: var(--text-secondary);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ==================== UTILITIES ==================== */
.hidden {
    display: none !important;
}

/* ==================== PROJECT DETAILS PAGE ==================== */

/* Back button */
.back-btn {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 18px;
    transition: all 0.3s;
}

.back-btn:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    transform: scale(1.05);
}

.back-btn i {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Add Profile button */
.add-profile-btn {
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.add-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.add-profile-btn:active {
    transform: translateY(0);
}

.project-details-container {
    padding: 20px;
}

/* Summary Stats Grid */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.summary-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
}

.summary-card:hover {
    transform: translateY(-3px);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.15);
}

.summary-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Charts Swiper */
.charts-swiper-container {
    margin-bottom: 25px;
    overflow: hidden;
    position: relative;
}

.charts-swiper {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.chart-slide {
    min-width: 100%;
    flex-shrink: 0;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
}

.chart-slide h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    color: var(--text-primary);
}

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

.chart-canvas-wrapper canvas {
    max-height: 100%;
}

/* Swiper Dots */
.swiper-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.swiper-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    cursor: pointer;
}

.swiper-dot:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.2);
}

.swiper-dot.active {
    background: var(--accent-color);
    width: 24px;
    border-radius: 4px;
}

/* Profiles Accordion */
.profiles-accordion {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.accordion-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.accordion-header i {
    font-size: 18px;
    transition: transform 0.3s;
    color: var(--accent-color);
}

.accordion-header i.rotated {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.accordion-content.open {
    max-height: 1000px;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

.profile-item {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.profile-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-stats {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.profile-stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.no-profiles {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ==================== MODAL ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height для мобильных */
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px 20px;
    width: 92%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 2001;
    animation: modalSlideIn 0.3s ease-out;
    box-sizing: border-box;
    margin: auto;
    /* Улучшенная прокрутка */
    -webkit-overflow-scrolling: touch;
}

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

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 18px;
    transition: all 0.3s;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 25px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
    .header {
        padding: 15px;
    }

    .greeting {
        font-size: 18px;
    }

    .section-title {
        font-size: 20px;
    }

    .project-card {
        padding: 15px;
    }

    .project-name {
        font-size: 18px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .summary-value {
        font-size: 20px;
    }

    .chart-slide {
        padding: 15px;
    }

    .chart-canvas-wrapper {
        height: 220px;
    }

    /* Modal adjustments for mobile */
    .modal-content {
        width: 95%;
        padding: 25px 20px;
        max-width: none;
    }

    .modal-title {
        font-size: 20px;
        margin-bottom: 10px;
        padding-right: 30px;
    }

    .modal-description {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .modal-close-btn {
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .add-profile-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* ==================== ADMIN PANEL ==================== */
.admin-container {
    padding: 20px;
}

.admin-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
}

.admin-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.admin-stat-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.admin-stat-item:hover {
    transform: translateY(-3px);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.15);
}

.admin-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-stat-value {
    font-size: 32px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-description {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

@media (max-width: 480px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-stat-value {
        font-size: 28px;
    }
}

/* ==================== ADMIN USERS LIST ==================== */
.admin-users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.admin-users-count {
    font-size: 14px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 15px;
    box-sizing: border-box;
    transition: all 0.3s;
}

.admin-search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.admin-search-input::placeholder {
    color: var(--text-secondary);
}

.admin-users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-user-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s;
}

.admin-user-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateX(5px);
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.admin-user-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.admin-user-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-user-stats {
    font-size: 12px;
    color: var(--text-secondary);
}

.admin-user-level {
    font-size: 11px;
    color: var(--accent-color);
    margin-top: 4px;
    font-weight: 500;
}

.admin-user-arrow {
    font-size: 16px;
    color: var(--accent-color);
    transition: transform 0.3s;
}

.admin-user-item:hover .admin-user-arrow {
    transform: translateX(5px);
}

.admin-user-item.hidden {
    display: none;
}

.admin-no-users {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 15px;
}

.btn-load-more {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 20px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
}

.btn-load-more:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
}

.btn-load-more.hidden {
    display: none;
}

/* ==================== USER DETAILS MODAL ==================== */
.modal-content-large {
    max-width: 500px;
}

.user-details-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.user-details-avatar {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.user-details-avatar-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.user-details-avatar-letter {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 24px;
    color: white;
}

.user-details-info {
    margin-top: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.user-level-info {
    text-align: center;
    margin-bottom: 12px;
}

.user-details-rank {
    font-size: 13px;
    font-weight: 600;
    color: #a78bfa;
    margin-bottom: 4px;
}

.user-details-level {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.user-progress-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    height: 28px;
    overflow: hidden;
    position: relative;
    margin: 12px 0;
}

.user-details-progress-bar {
    background: linear-gradient(90deg, #a78bfa, #8b5cf6);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
}

.user-progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-progress-text {
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.user-progress-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.user-progress-percent {
    color: rgba(255, 255, 255, 0.5);
}

.user-xp-daily {
    color: #10b981;
    font-weight: 500;
}

.user-projects-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.user-project-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.user-project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.user-project-card:hover {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.user-project-card:hover::before {
    opacity: 1;
}

.user-project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.user-project-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-project-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.user-project-stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.user-project-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.user-project-stat-value {
    font-size: 20px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-project-actions {
    display: flex;
    gap: 10px;
}

.btn-danger {
    flex: 1;
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(244, 67, 54, 0.4);
}

.btn-success {
    flex: 1;
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    flex: 1;
    background: linear-gradient(135deg, #607d8b 0%, #455a64 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(96, 125, 139, 0.4);
}

.btn-warning {
    flex: 1;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 152, 0, 0.4);
}

.user-no-projects {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ==================== BONUS MODAL ==================== */
#bonus-username {
    font-weight: 600;
    color: var(--accent-color);
}

.modal-content .input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 20px;
    box-sizing: border-box;
    transition: all 0.3s;
}

.modal-content .input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.modal-content .btn-primary {
    width: 100%;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-content .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.modal-content .btn-primary:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .user-project-stats-grid {
        grid-template-columns: 1fr;
    }

    .user-project-actions {
        flex-direction: column;
    }

    .modal-content-large {
        max-width: none;
    }

    .admin-card {
        padding: 20px 15px;
    }

    .admin-user-item {
        padding: 12px;
    }

    .admin-user-name {
        font-size: 14px;
    }

    .admin-user-stats {
        font-size: 11px;
    }

    .admin-user-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .admin-user-avatar-img {
        width: 36px;
        height: 36px;
    }
}

/* ==================== USER MANAGEMENT PAGE ==================== */
.admin-card-clickable {
    cursor: pointer;
    transition: all 0.3s;
}

.admin-card-clickable:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-card-arrow {
    font-size: 20px;
    color: var(--accent-color);
    transition: transform 0.3s;
}

.admin-card-clickable:hover .admin-card-arrow {
    transform: translateX(5px);
}

.user-management-container {
    padding: 20px;
}

.user-management-count {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.user-management-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 480px) {
    .user-management-container {
        padding: 15px;
    }
}

/* ==================== PROFILE MODAL MULTI-STEP ==================== */
.profile-step {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profile-step.hidden {
    display: none !important;
}

.status-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.status-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.status-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.status-icon {
    font-size: 36px;
}

.status-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-desc {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.topic-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    color: var(--text-primary);
    text-align: center;
}

.topic-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .status-buttons {
        grid-template-columns: 1fr;
    }

    .topic-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== SOCIAL TOGGLE SWITCHES ==================== */
.social-toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
}

.social-toggle-item span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.4s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* ==================== WIZARD STEPS ==================== */
.profile-step {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.profile-step.hidden {
    display: none;
}

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

/* ==================== STATUS BUTTONS ==================== */
.status-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.status-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
}

.status-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.status-btn:active {
    transform: translateY(0);
}

.status-icon {
    font-size: 48px;
    line-height: 1;
}

.status-label {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.status-sublabel {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* ==================== TOPIC GRID ==================== */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.topic-btn {
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.topic-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.topic-btn:active {
    transform: translateY(0);
}

/* ==================== EMAIL FARM STYLES ==================== */

.emails-container {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.email-stats-card,
.email-action-card,
.email-list-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.email-stats-card h3,
.email-list-card h3 {
    margin: 0 0 15px 0;
    color: white;
    font-size: 18px;
}

#email-limits-info p {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
}

#email-limits-info span {
    font-weight: 600;
    color: white;
}

.emails-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.email-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.email-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.email-address {
    color: white;
    font-weight: 500;
    font-size: 15px;
}

.email-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.status-free {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.status-banned {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.status-archived {
    background: rgba(158, 158, 158, 0.2);
    color: #9E9E9E;
}

.email-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-secondary {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 140px;
}

.btn-secondary:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 140px;
}

.btn-danger:hover {
    background: rgba(244, 67, 54, 0.3);
    border-color: #F44336;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .emails-container {
        padding: 15px;
    }

    .email-actions {
        flex-direction: column;
    }

    .btn-secondary,
    .btn-danger {
        width: 100%;
        min-width: 0;
    }
}


/* Улучшенные стили модальных окон для мобильных */
@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        max-width: 100%;
        padding: 20px 16px;
        max-height: 80vh;
        border-radius: 12px;
    }
    
    .modal-header {
        margin-bottom: 16px;
        padding-right: 35px;
    }
    
    .modal-header h3 {
        font-size: 18px !important;
        margin: 0;
    }
    
    .modal-body {
        padding: 12px 0;
    }
    
    .input-group {
        margin-bottom: 14px;
    }
    
    .input-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .input-group input,
    .input-group textarea {
        font-size: 15px;
        padding: 10px 12px;
    }
    
    .modal-footer {
        margin-top: 16px;
        gap: 10px;
    }
    
    .modal-footer button {
        padding: 11px 18px;
        font-size: 14px;
    }
    
    .close-btn {
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
}

/* Красивые стили для полей ввода в модальных окнах */
.modal-body .input-group {
    margin-bottom: 18px;
}

.modal-body .input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.modal-body .input-group input,
.modal-body .input-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
}

.modal-body .input-group input:focus,
.modal-body .input-group textarea:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(167, 139, 250, 0.5);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

.modal-body .input-group input::placeholder,
.modal-body .input-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.modal-body .input-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Стили для кнопок в футере */
.modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 4px;
}

.modal-footer .btn,
.modal-footer .btn-secondary {
    flex: 1;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-footer .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}

.modal-footer .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(167, 139, 250, 0.4);
}

/* Стили для small текстов-подсказок */
.modal-body small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}
