/* Winions Dice Roller - Complete Styles */

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

:root {
    --primary-red: #ff1a1a;
    --dark-bg: #000000;
    --school-color: #ff1a1a;
}

body {
    font-family: 'Courier New', monospace;
    background: var(--dark-bg);
    color: var(--primary-red);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Grain effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='3.5' numOctaves='6' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    animation: grain 0.15s steps(10) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-1%, -1%); }
    20% { transform: translate(1%, 1%); }
    30% { transform: translate(-2%, 0); }
    40% { transform: translate(2%, -2%); }
    50% { transform: translate(-1%, 2%); }
    60% { transform: translate(1%, 0); }
    70% { transform: translate(0, 1%); }
    80% { transform: translate(-2%, -1%); }
    90% { transform: translate(2%, 1%); }
}

.container {
    max-width: 1200px;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid var(--primary-red);
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 0 40px rgba(255, 26, 26, 0.6);
    position: relative;
    z-index: 1;
}

h1 {
    text-align: center;
    font-size: 48px;
    margin-bottom: 10px;
    color: var(--primary-red);
    text-shadow: 0 0 20px rgba(255, 26, 26, 0.8);
    letter-spacing: 4px;
}

.subtitle {
    text-align: center;
    font-size: 18px;
    margin-bottom: 40px;
    color: #dd0000;
}

.description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.6;
    color: #ccc;
}

/* Wallet Gate */
.gate-content {
    text-align: center;
    padding: 40px 20px;
}

.gate-winion-gif {
    width: 300px;
    height: 300px;
    object-fit: contain;
    border: 3px solid var(--primary-red);
    border-radius: 10px;
    margin: 20px auto;
    box-shadow: 0 0 30px rgba(255, 26, 26, 0.5);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 26, 26, 0.5); }
    50% { box-shadow: 0 0 50px rgba(255, 26, 26, 0.8); }
}

.gate-description {
    max-width: 600px;
    margin: 30px auto;
    font-size: 16px;
    line-height: 1.6;
    color: #ccc;
}

.wallet-status {
    background: rgba(255, 26, 26, 0.1);
    border: 2px solid var(--primary-red);
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    color: #ffffff;
}

.connect-button, .action-button {
    background: rgba(255, 26, 26, 0.2);
    border: 3px solid var(--primary-red);
    color: #ffffff;
    padding: 20px 60px;
    font-size: 24px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(255, 26, 26, 0.4);
}

.connect-button:hover, .action-button:hover {
    background: rgba(255, 26, 26, 0.4);
    box-shadow: 0 0 40px rgba(255, 26, 26, 0.8);
    transform: translateY(-2px);
}

.connect-button:disabled, .action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 🔥 FOMO COUNTER */
.fomo-counter {
    text-align: center;
    margin: 30px auto;
    padding: 20px;
    max-width: 500px;
    background: rgba(255, 26, 26, 0.1);
    border: 2px solid var(--primary-red);
    border-radius: 8px;
    animation: pulseFomo 2s ease-in-out infinite;
}

.fomo-text {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-red);
    text-shadow: 0 0 20px rgba(255, 26, 26, 0.8);
    letter-spacing: 2px;
}

.fomo-number {
    font-size: 48px;
    color: #ffffff;
    text-shadow: 0 0 30px rgba(255, 26, 26, 1);
}

@keyframes pulseFomo {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 26, 26, 0.4);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 40px rgba(255, 26, 26, 0.8);
    }
}

@keyframes flashFomo {
    0%, 100% { 
        background: rgba(255, 26, 26, 0.1);
    }
    50% { 
        background: rgba(255, 26, 26, 0.4);
        transform: scale(1.05);
        box-shadow: 0 0 60px rgba(255, 26, 26, 1);
    }
}

.verification-status {
    margin-top: 20px;
    text-align: center;
}

.verification-status .error {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ff4444;
}

.verification-status .success {
    color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #00ff00;
}

.verification-status .info {
    color: #4a90e2;
    background: rgba(74, 144, 226, 0.1);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #4a90e2;
}

/* Rolls Screen */
.rolls-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.roll-type {
    background: rgba(255, 26, 26, 0.1);
    border: 2px solid var(--primary-red);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.roll-type h3 {
    font-size: 20px;
    color: var(--primary-red);
    margin-bottom: 20px;
}

.roll-count {
    font-size: 72px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 26, 26, 1);
    margin: 20px 0;
}

.roll-type p {
    color: #999;
    font-size: 14px;
}

/* Purchase Section */
.purchase-section {
    margin: 50px 0;
    text-align: center;
}

.purchase-section h3 {
    font-size: 24px;
    color: var(--primary-red);
    margin-bottom: 30px;
}

.purchase-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.purchase-button {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--primary-red);
    color: #ffffff;
    padding: 25px 20px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.purchase-button:hover {
    background: rgba(255, 26, 26, 0.2);
    border-color: #ff4444;
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(255, 26, 26, 0.6);
}

.purchase-button.popular {
    border-color: #ffd700;
}

.purchase-button .badge {
    position: absolute;
    top: -12px;
    right: 10px;
    background: #ffd700;
    color: #000;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
}

.purchase-button .package {
    font-size: 20px;
    font-weight: bold;
}

.purchase-button .price {
    font-size: 18px;
    color: #00ff00;
}

.purchase-button .savings {
    font-size: 12px;
    color: #ffd700;
}

/* School Selection */
.dice-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
}

.dice-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(255, 26, 26, 0.5));
}

.button-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.school-button {
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid var(--primary-red);
    color: #ffffff;
    padding: 20px 30px;
    font-size: 20px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.school-button:hover {
    background: rgba(255, 26, 26, 0.2);
    box-shadow: 0 0 30px rgba(255, 26, 26, 0.6);
    transform: translateY(-3px);
}

.button-icon {
    width: 40px;
    height: 40px;
}

/* Dice Rolling */
.dice-display {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 8px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--primary-red);
    border-radius: 5px;
    min-height: 250px;
}

.die {
    aspect-ratio: 1;
    background: #1a1a1a;
    border: 2px solid var(--school-color, var(--primary-red));
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: var(--school-color, var(--primary-red));
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 26, 26, 0.3);
}

.die.rolling {
    animation: diceRoll 0.5s ease-in-out;
    background: #2a0000;
}

@keyframes diceRoll {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(0.9); }
    75% { transform: rotate(270deg) scale(1.1); }
}

.controls {
    text-align: center;
    margin: 30px 0;
}

.roll-button {
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid var(--school-color, var(--primary-red));
    color: #ffffff;
    padding: 20px 60px;
    font-size: 28px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(255, 26, 26, 0.4);
}

.roll-button:hover:not(:disabled) {
    background: rgba(255, 26, 26, 0.2);
    box-shadow: 0 0 40px rgba(255, 26, 26, 0.8);
    transform: translateY(-3px);
}

.roll-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dice-total {
    margin-top: 30px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid var(--school-color, var(--primary-red));
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 20px rgba(255, 26, 26, 0.4);
}

.total-label {
    font-size: 20px;
    color: var(--school-color, var(--primary-red));
    display: block;
    margin-bottom: 10px;
}

.total-value {
    font-size: 72px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 26, 26, 1);
    display: block;
}

.total-range {
    display: block;
    font-size: 16px;
    color: #999;
    margin-top: 10px;
}

/* House Result */
.house-result-display {
    margin-top: 40px;
    text-align: center;
    padding: 40px;
    background: rgba(255, 26, 26, 0.1);
    border: 3px solid var(--primary-red);
    border-radius: 10px;
    animation: revealFade 0.5s ease-in;
}

@keyframes revealFade {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.house-result-display h3 {
    color: var(--primary-red);
    font-size: 24px;
    margin-bottom: 20px;
}

.house-name-large {
    font-size: 48px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 26, 26, 1);
    margin: 20px 0;
}

.claim-button {
    background: rgba(255, 26, 26, 0.3);
    border: 3px solid var(--primary-red);
    color: #ffffff;
    padding: 20px 60px;
    font-size: 24px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-radius: 5px;
    margin-top: 30px;
}

.claim-button:hover:not(:disabled) {
    background: rgba(255, 26, 26, 0.5);
    box-shadow: 0 0 40px rgba(255, 26, 26, 1);
    transform: scale(1.05);
}

.claim-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: #000000;
    border: 4px solid var(--primary-red);
    border-radius: 15px;
    padding: 50px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 60px rgba(255, 26, 26, 0.8);
    animation: slideUp 0.5s ease;
}

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

.modal-content h2 {
    font-size: 36px;
    color: var(--primary-red);
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 26, 26, 0.8);
}

.modal-content h3 {
    font-size: 28px;
    color: #ffffff;
    margin: 20px 0;
}

.claimed-nft-image {
    width: 350px;
    height: 350px;
    object-fit: contain;
    border: 4px solid var(--primary-red);
    border-radius: 10px;
    margin: 20px auto;
    box-shadow: 0 0 40px rgba(255, 26, 26, 0.6);
}

.claimed-details {
    font-size: 18px;
    color: #ccc;
    margin: 20px 0;
    line-height: 1.8;
}

.etherscan-link {
    display: inline-block;
    color: #4a90e2;
    text-decoration: none;
    font-size: 16px;
    margin: 20px 0;
    padding: 10px 20px;
    border: 1px solid #4a90e2;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.etherscan-link:hover {
    background: rgba(74, 144, 226, 0.1);
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.4);
}

.close-button {
    background: rgba(255, 26, 26, 0.2);
    border: 2px solid var(--primary-red);
    color: #ffffff;
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    margin-top: 30px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 5px;
}

.close-button:hover {
    background: rgba(255, 26, 26, 0.4);
    box-shadow: 0 0 20px rgba(255, 26, 26, 0.6);
    transform: scale(1.05);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 32px;
    }
    
    .fomo-text {
        font-size: 20px;
    }
    
    .fomo-number {
        font-size: 36px;
    }
    
    .dice-display {
        grid-template-columns: repeat(6, 1fr);
        gap: 5px;
        padding: 10px;
    }
    
    .die {
        font-size: 14px;
    }
    
    .connect-button, .action-button, .roll-button {
        padding: 15px 30px;
        font-size: 18px;
    }
    
    .total-value {
        font-size: 48px;
    }
    
    .gate-winion-gif, .claimed-nft-image {
        width: 200px;
        height: 200px;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
    
    .dice-row {
        gap: 20px;
    }
    
    .dice-image {
        width: 100px;
        height: 100px;
    }
    
    .button-row {
        flex-direction: column;
    }
    
    .school-button {
        width: 100%;
    }
    
    .purchase-options {
        grid-template-columns: 1fr;
    }
}
