/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100vh;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 25%, #6d28d9 50%, #7c3aed 75%, #8b5cf6 100%);
    color: #ffffff;
    line-height: 1.5;
}

/* Only disable text selection in Telegram Mini App */
.telegram-mini-app {
    -webkit-user-select: none;
    user-select: none;
}

.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

/* Header Styles */
.header {
    padding: 12px 20px;
    background: rgba(76, 29, 149, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.phantom-logo {
    width: 24px;
    height: 21px;
    color: #ffffff;
}

.brand-text {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
    overflow: hidden;
}

/* Hero Section */
.hero {
    text-align: center;
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInDown 0.8s ease-out 0.2s forwards;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.phantom-icon {
    width: 70px;
    height: 63px;
    display: inline-block;
    vertical-align: middle;
    margin: 0 -4px;
    color: #ffffff;
    animation: float-smooth 4s linear infinite;
    transform-origin: center;
}

@keyframes float-smooth {
    0% { 
        transform: translateX(0px) translateY(0px);
    }
    25% { 
        transform: translateX(2px) translateY(-2px);
    }
    50% { 
        transform: translateX(0px) translateY(-3px);
    }
    75% { 
        transform: translateX(-2px) translateY(-2px);
    }
    100% { 
        transform: translateX(0px) translateY(0px);
    }
}

.hero-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    line-height: 1.4;
}

/* Action Section */
.action-section {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    color: #4c1d95;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(255, 255, 255, 0.2);
    width: 180px;
    height: 50px;
    min-width: 180px;
    max-width: 180px;
    min-height: 50px;
    max-height: 50px;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
}

.btn:active {
    transform: scale(0.98);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(255, 255, 255, 0.3);
}

.wallet-icon {
    width: 18px;
    height: 18px;
}

/* Features Section */
.features {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 18px 14px;
    text-align: center;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.3s ease;
}

.feature-card:nth-child(1) {
    animation: fadeInUp 0.6s ease-out 1.0s forwards;
}

.feature-card:nth-child(2) {
    animation: fadeInUp 0.6s ease-out 1.2s forwards;
}

.feature-card:nth-child(3) {
    animation: fadeInUp 0.6s ease-out 1.4s forwards;
}

.feature-card:hover {
    transform: translateY(-5px) rotateY(5deg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    transition: all 0.3s ease;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: #ffffff;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon svg {
    transform: rotateY(180deg) scale(1.1);
}

.feature-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
    line-height: 1.3;
}

/* Airdrop Section */
.airdrop {
    flex: 1;
    min-height: 0;
}

.airdrop-card {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    animation: scaleIn 0.8s ease-out 1.6s forwards;
    transition: all 0.3s ease;
}

.airdrop-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.airdrop-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.airdrop-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.airdrop-icon svg {
    width: 18px;
    height: 18px;
    color: #ffffff;
}

.airdrop-header span {
    font-size: 0.9rem;
    font-weight: 600;
}

.airdrop-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
}

.airdrop-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
    line-height: 1.4;
}


/* Animation Keyframes */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(255, 255, 255, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 6px 24px rgba(255, 255, 255, 0.6);
        transform: scale(1.02);
    }
}

/* Background Animation */
body {
    background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 25%, #6d28d9 50%, #7c3aed 75%, #8b5cf6 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Responsive Design for smaller screens */
@media (max-width: 390px) {
    .main-content {
        padding: 16px;
        gap: 16px;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .features-grid {
        gap: 10px;
    }
    
    .feature-card {
        padding: 14px 10px;
    }
    
    .feature-card h3 {
        font-size: 0.8rem;
    }
    
    .feature-card p {
        font-size: 0.65rem;
    }
    
    .security-card {
        padding: 14px;
    }
}

@media (max-height: 700px) {
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }
    
    .hero-subtitle {
        font-size: 0.8rem;
    }
    
    .main-content {
        gap: 16px;
    }
    
    .feature-card {
        padding: 12px 8px;
    }
    
    .feature-icon {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }
}

/* Telegram Mini App specific styles */
@media (max-height: 600px) {
    .header {
        padding: 8px 16px;
    }
    
    .main-content {
        padding: 16px;
        gap: 12px;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .features-grid {
        margin-bottom: 12px;
    }
    
    .security-text {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }
}

/* Анимация для индикатора инициализации */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}