/**
 * CRYPTO TEK AI - PROFILE PAGE STYLES
 * Desktop-optimized layout with beautiful card grid
 */

/* ============================
   PROFILE CONTAINER - BASE
   ============================ */

.profile-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* ============================
   PROFILE HEADER CARD
   ============================ */

.profile-header-card {
    background: linear-gradient(135deg, rgba(33,150,243,0.2) 0%, rgba(156,39,176,0.15) 50%, rgba(76,175,80,0.2) 100%);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 0 0 24px 24px;
    text-align: center;
    padding: 24px 12px;
    margin-bottom: 16px;
}

.profile-header-card h1 {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.profile-header-card .profile-subtitle {
    margin: 0 0 20px;
    opacity: 0.9;
    font-size: 14px;
}

.profile-header-card h2 {
    margin: 0 0 4px;
}

.profile-header-card .profile-id {
    margin: 0;
    opacity: 0.7;
    font-size: 14px;
}

/* ============================
   PROFILE GRID LAYOUT
   ============================ */

.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* ============================
   PROFILE CARDS
   ============================ */

.profile-card {
    background: var(--bg-secondary, #1a1a2e);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.profile-card:hover {
    border-color: rgba(255, 107, 53, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.profile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.profile-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================
   LANGUAGE SELECTOR
   ============================ */

.language-grid {
    display: flex;
    gap: 8px;
}

.lang-btn {
    flex: 1;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: #fff;
    text-align: center;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.1);
}

.lang-btn.active {
    background: rgba(255,107,53,0.3);
    border-color: #FF6B35;
}

.lang-btn .flag {
    font-size: 24px;
    display: block;
}

.lang-btn .lang-name {
    font-size: 13px;
    margin-top: 4px;
    display: block;
}

/* ============================
   EXCHANGE SELECTOR
   ============================ */

.exchange-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.exchange-btn {
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.exchange-btn:hover {
    background: rgba(255,255,255,0.1);
}

.exchange-btn.active {
    background: rgba(255,107,53,0.3);
    border-color: #FF6B35;
}

/* ============================
   RISK MANAGEMENT SETTINGS
   ============================ */

.risk-settings-grid {
    display: grid;
    gap: 12px;
}

.risk-setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.risk-setting-item:hover {
    background: rgba(255,255,255,0.08);
}

.risk-setting-item span:first-child {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.risk-setting-item span:last-child {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
}

/* ============================
   EDIT BUTTON
   ============================ */

.btn-edit {
    padding: 6px 12px;
    background: rgba(255,107,53,0.2);
    border: none;
    border-radius: 6px;
    color: #FF6B35;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
}

.btn-edit:hover {
    background: rgba(255,107,53,0.3);
    transform: translateY(-1px);
}

/* ============================
   APP INFO FOOTER
   ============================ */

.profile-footer {
    text-align: center;
    padding: 20px;
    opacity: 0.5;
    font-size: 12px;
}

.profile-footer p {
    margin: 0;
}

.profile-footer .version {
    margin-top: 4px;
}

/* ============================
   DEV BUTTONS (Logout, Monthly Report)
   ============================ */

.dev-button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dev-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.dev-button.monthly-report {
    background: linear-gradient(135deg, #f9c300 0%, #ff6b35 100%);
    color: #1a1a2e;
    font-weight: 800;
    font-size: 16px;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(249, 195, 0, 0.3);
}

.dev-button.logout {
    background: linear-gradient(135deg, #f44336, #e91e63);
    color: white;
}

.dev-badge {
    font-size: 10px;
    background: #e91e63;
    padding: 2px 6px;
    border-radius: 4px;
    color: white;
}

.dev-description {
    margin: 10px 0 0;
    font-size: 12px;
    opacity: 0.7;
    text-align: center;
}

/* ============================
   TABLET LAYOUT (768px+)
   ============================ */

@media (min-width: 768px) {
    .profile-container {
        padding: 0 20px;
    }

    .profile-header-card {
        border-radius: 24px;
        margin: 0 0 24px;
        padding: 32px 24px;
    }

    .profile-header-card h1 {
        font-size: 30px;
    }

    .profile-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .profile-card {
        padding: 24px;
    }

    .language-grid {
        gap: 12px;
    }

    .lang-btn {
        padding: 16px;
    }

    .lang-btn .flag {
        font-size: 28px;
    }

    .exchange-grid {
        gap: 10px;
    }

    .exchange-btn {
        padding: 12px;
        font-size: 13px;
    }
}

/* ============================
   DESKTOP LAYOUT (1024px+)
   ============================ */

@media (min-width: 1024px) {
    .profile-container {
        max-width: 1200px;
        padding: 0 40px;
    }

    .profile-header-card {
        padding: 40px 32px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }

    .profile-header-info {
        flex: 1;
    }

    .profile-header-card h1 {
        font-size: 32px;
    }

    .profile-header-card .profile-subtitle {
        margin-bottom: 0;
    }

    .profile-header-user {
        text-align: right;
    }

    .profile-header-user h2 {
        font-size: 22px;
    }

    .profile-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* Language card - full width */
    .profile-card.language-card {
        grid-column: 1;
    }

    /* Exchange card - full width */
    .profile-card.exchange-card {
        grid-column: 2;
    }

    /* Risk card - full width */
    .profile-card.risk-card {
        grid-column: 1 / -1;
    }

    .profile-card {
        padding: 28px;
        border-radius: 20px;
    }

    .profile-card-header h3 {
        font-size: 18px;
    }

    .risk-settings-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .risk-setting-item {
        padding: 16px 18px;
    }

    /* Dev cards side by side */
    .profile-card.dev-card {
        grid-column: span 1;
    }
}

/* ============================
   LARGE DESKTOP (1440px+)
   ============================ */

@media (min-width: 1440px) {
    .profile-container {
        max-width: 1400px;
        padding: 0 60px;
    }

    .profile-header-card {
        padding: 48px 40px;
        border-radius: 28px;
    }

    .profile-header-card h1 {
        font-size: 36px;
    }

    .profile-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px;
    }

    /* Language card */
    .profile-card.language-card {
        grid-column: 1;
    }

    /* Exchange card */
    .profile-card.exchange-card {
        grid-column: 2;
    }

    /* Risk card */
    .profile-card.risk-card {
        grid-column: 3;
        grid-row: span 2;
    }

    .risk-settings-grid {
        grid-template-columns: 1fr;
    }

    .profile-card {
        padding: 32px;
    }

    .exchange-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .exchange-btn {
        padding: 14px;
        font-size: 14px;
    }

    /* Dev cards */
    .profile-card.dev-card:first-of-type {
        grid-column: 1;
    }

    .profile-card.dev-card:last-of-type {
        grid-column: 2;
    }
}

/* ============================
   ULTRA WIDE (1920px+)
   ============================ */

@media (min-width: 1920px) {
    .profile-container {
        max-width: 1600px;
        padding: 0 80px;
    }

    .profile-header-card {
        padding: 56px 48px;
    }

    .profile-header-card h1 {
        font-size: 40px;
    }

    .profile-grid {
        gap: 32px;
    }

    .profile-card {
        padding: 36px;
        border-radius: 24px;
    }

    .profile-card-header h3 {
        font-size: 20px;
    }

    .lang-btn {
        padding: 20px;
    }

    .lang-btn .flag {
        font-size: 32px;
    }

    .lang-btn .lang-name {
        font-size: 15px;
    }

    .exchange-btn {
        padding: 16px;
        font-size: 15px;
    }

    .risk-setting-item {
        padding: 18px 20px;
    }

    .risk-setting-item span {
        font-size: 15px;
    }
}

/* ============================
   RISK EDITOR MODAL - DESKTOP
   ============================ */

@media (min-width: 768px) {
    .modal-overlay .modal-content {
        max-width: 500px;
        padding: 32px;
    }
}

@media (min-width: 1024px) {
    .modal-overlay .modal-content {
        max-width: 600px;
        padding: 36px;
    }

    .modal-content h2 {
        font-size: 22px;
    }

    .modal-content label {
        font-size: 15px;
    }

    .modal-content input {
        padding: 14px;
        font-size: 16px;
    }

    .preset-leverage,
    .preset-position {
        padding: 10px;
        font-size: 14px;
    }

    .risk-mode-btn {
        padding: 16px;
    }

    .risk-mode-btn > div:first-child {
        font-size: 16px;
    }

    .btn-save-risk {
        padding: 16px;
        font-size: 17px;
    }
}

/* ============================
   PLAN BADGE STYLING
   ============================ */

#profile-plan-badge {
    margin-top: 12px;
}

#profile-plan-badge .plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

@media (min-width: 1024px) {
    #profile-plan-badge .plan-badge {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ============================
   ANIMATIONS
   ============================ */

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

.profile-card {
    animation: fadeInUp 0.4s ease forwards;
}

.profile-card:nth-child(1) { animation-delay: 0.05s; }
.profile-card:nth-child(2) { animation-delay: 0.1s; }
.profile-card:nth-child(3) { animation-delay: 0.15s; }
.profile-card:nth-child(4) { animation-delay: 0.2s; }
.profile-card:nth-child(5) { animation-delay: 0.25s; }

/* ============================
   LIGHT THEME SUPPORT
   ============================ */

body.light-theme .profile-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .profile-card:hover {
    border-color: rgba(255, 107, 53, 0.3);
}

body.light-theme .lang-btn,
body.light-theme .exchange-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1f35;
}

body.light-theme .lang-btn:hover,
body.light-theme .exchange-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

body.light-theme .lang-btn.active,
body.light-theme .exchange-btn.active {
    background: rgba(255, 107, 53, 0.15);
}

body.light-theme .risk-setting-item {
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .risk-setting-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme .risk-setting-item span:first-child {
    color: #6b7280;
}

body.light-theme .risk-setting-item span:last-child {
    color: #1a1f35;
}
