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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    min-height: 100vh;
    overflow: hidden;
}

.screen {
    display: none;
    width: 100%;
    height: 100vh;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* Login Screen */
#login-screen {
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.login-container h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.input-field {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 15px;
    transition: border-color 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: #666666;
}

.primary-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #555555 0%, #333333 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(85, 85, 85, 0.4);
}

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

.secondary-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #666666;
    border: 2px solid #666666;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.otp-info {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

#phone-display {
    font-weight: 600;
    color: #333;
}

.error-message {
    color: #e74c3c;
    margin-top: 15px;
    font-size: 14px;
    min-height: 20px;
}

/* App Screen */
#app-screen {
    position: relative;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.app-header h2 {
    color: white;
    font-size: 20px;
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.coin-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.coin-icon {
    font-size: 20px;
}

.logout-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.buy-coins-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-coins-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.cards-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.no-data {
    color: white;
    font-size: 18px;
    text-align: center;
}

#cards-stack {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 600px;
}

.card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    cursor: grab;
    user-select: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    overflow-y: auto;
}

.card:active {
    cursor: grabbing;
}

.card.swiping {
    transition: none;
}

.card.removing {
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.ticker {
    font-size: 28px;
    font-weight: 700;
    color: #666666;
    margin-top: 12px;
}

.portfolio-statement {
    font-size: 20px;
    color: #333;
    line-height: 1.6;
    font-weight: 500;
}

.portfolio-statement strong {
    color: #555555;
    font-weight: 700;
}

.highlight-percent {
    font-size: 24px;
    font-weight: 800;
    color: #333333;
    background: linear-gradient(135deg, #666666 0%, #333333 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-body {
    margin-bottom: 20px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.investment-logic {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    position: relative;
}

.investment-logic {
    white-space: pre-wrap;
    line-height: 1.8;
    color: #333;
    max-height: 400px;
    overflow-y: auto;
}

.investment-logic.locked {
    filter: blur(8px);
    user-select: none;
    pointer-events: none;
    transition: filter 0.6s ease-out, opacity 0.6s ease-out;
}

.unlock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.unlock-btn {
    background: linear-gradient(135deg, #555555 0%, #333333 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(85, 85, 85, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.unlock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(85, 85, 85, 0.5);
}

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

.unlock-cost {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 16px;
}

.logic-heading {
    font-size: 18px;
    font-weight: 700;
    color: #555555;
    margin: 20px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.logic-heading:first-child {
    margin-top: 0;
}

.logic-paragraph {
    margin-bottom: 16px;
    text-align: justify;
}

.logic-paragraph:last-child {
    margin-bottom: 0;
}

.investment-logic strong {
    color: #667eea;
    font-weight: 600;
}

.investment-logic em {
    color: #555;
    font-style: italic;
}

.logic-link {
    color: #555555;
    text-decoration: none;
    border-bottom: 1px solid #555555;
    transition: all 0.2s ease;
}

.logic-link:hover {
    color: #333333;
    border-bottom-color: #333333;
}

.card-footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding-top: 20px;
}

.card-footer.locked {
    filter: blur(8px);
    user-select: none;
    pointer-events: none;
    transition: filter 0.6s ease-out, opacity 0.6s ease-out;
}

.investment-logic.locked {
    filter: blur(10px);
    user-select: none;
    pointer-events: none;
    transition: filter 0.6s ease-out, opacity 0.6s ease-out;
}

@keyframes revealContent {
    0% {
        filter: blur(10px);
        opacity: 0.5;
    }
    100% {
        filter: blur(0);
        opacity: 1;
    }
}

.stat {
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.swipe-indicator {
    position: absolute;
    bottom: 100px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    gap: 20px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #555555;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.swipe-hint {
    color: white;
    font-size: 14px;
    opacity: 0.7;
    font-weight: 600;
}

.card-counter {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .login-container {
        padding: 30px 20px;
    }

    #cards-stack {
        height: 500px;
    }

    .card {
        padding: 20px;
    }

    .ticker {
        font-size: 28px;
    }

    .investment-logic {
        font-size: 14px;
    }
}

/* Prevent overscroll */
html, body {
    overscroll-behavior: none;
    touch-action: pan-x pan-y;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

.modal-content h2 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 28px;
}

.modal-subtitle {
    color: #666;
    margin-bottom: 30px;
}

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

.coin-package {
    background: linear-gradient(135deg, #555555 0%, #333333 100%);
    color: white;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.coin-package:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    border-color: #ffd700;
}

.coin-package-coins {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.coin-package-price {
    font-size: 24px;
    font-weight: 600;
    margin-top: 10px;
}

.coin-package-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

