/* Main Screen Styles for Retro Chess Dungeon */

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

body {
    font-family: 'Press Start 2P', cursive;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #96E9C6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#main-container {
    max-width: 800px;
    width: 100%;
    animation: fadeIn 0.5s ease-in;
}

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

/* Header */
#header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(108, 34, 166, 0.2);
    border: 3px solid #6C22A6;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(108, 34, 166, 0.5);
}

#header h1 {
    font-size: 24px;
    color: #96E9C6;
    text-shadow: 0 0 10px #96E9C6;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.tagline {
    font-size: 10px;
    color: #83C0C1;
    letter-spacing: 1px;
}

/* Main Screen */
#main-screen {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.section {
    background: rgba(105, 98, 173, 0.1);
    border: 3px solid #6962AD;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 0 15px rgba(105, 98, 173, 0.3);
}

.section h2 {
    font-size: 16px;
    color: #96E9C6;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 8px #96E9C6;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 10px;
    color: #83C0C1;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #6962AD;
    border-radius: 5px;
    color: #96E9C6;
    outline: none;
    transition: all 0.3s;
}

.form-group input[type="text"]:focus {
    border-color: #6C22A6;
    box-shadow: 0 0 10px rgba(108, 34, 166, 0.5);
}

.form-group input[type="text"]::placeholder {
    color: rgba(150, 233, 198, 0.3);
}

/* Info Message */
.info-message {
    margin: 20px 0;
    padding: 15px;
    background: rgba(131, 192, 193, 0.1);
    border: 2px solid #83C0C1;
    border-radius: 5px;
    text-align: center;
}

.info-message p {
    font-size: 10px;
    color: #83C0C1;
    line-height: 1.8;
    margin: 5px 0;
}

.info-message strong {
    color: #96E9C6;
    text-shadow: 0 0 5px #96E9C6;
}

/* Buttons */
.retro-btn {
    width: 100%;
    padding: 15px;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    border: 3px solid;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.retro-btn.primary {
    background: #6C22A6;
    border-color: #96E9C6;
    color: #96E9C6;
    box-shadow: 0 0 15px rgba(108, 34, 166, 0.5);
}

.retro-btn.primary:hover {
    background: #8B2FC9;
    box-shadow: 0 0 25px rgba(108, 34, 166, 0.8);
    transform: translateY(-2px);
}

.retro-btn.secondary {
    background: #6962AD;
    border-color: #83C0C1;
    color: #83C0C1;
}

.retro-btn.secondary:hover {
    background: #7B72BD;
    box-shadow: 0 0 15px rgba(131, 192, 193, 0.5);
}

.retro-btn.large {
    padding: 20px;
    font-size: 14px;
}

.retro-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Divider */
.divider {
    text-align: center;
    position: relative;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 2px;
    background: linear-gradient(to right, transparent, #6962AD, transparent);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    display: inline-block;
    padding: 0 20px;
    font-size: 12px;
    color: #83C0C1;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* Error Message */
.error-box {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid #ff0000;
    border-radius: 5px;
    color: #ff6b6b;
    font-size: 10px;
    text-align: center;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Loading */
.loading {
    text-align: center;
    margin-top: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border: 4px solid rgba(150, 233, 198, 0.2);
    border-top-color: #96E9C6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading p {
    font-size: 10px;
    color: #83C0C1;
}

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

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 3px solid #6C22A6;
    border-radius: 10px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 0 30px rgba(108, 34, 166, 0.8);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-content h2 {
    font-size: 16px;
    color: #ff6b6b;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ff6b6b;
}

.modal-warning {
    font-size: 10px;
    color: #83C0C1;
    text-align: center;
    line-height: 1.8;
    margin-bottom: 30px;
}

.token-display {
    margin-bottom: 30px;
}

.token-box {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #6962AD;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 15px;
    text-align: center;
}

.token-box code {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    color: #96E9C6;
    word-break: break-all;
    text-shadow: 0 0 8px #96E9C6;
}

.modal-info {
    background: rgba(108, 34, 166, 0.2);
    border: 2px solid #6C22A6;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.modal-info p {
    font-size: 10px;
    color: #96E9C6;
    margin: 5px 0;
}

.modal-info strong {
    color: #83C0C1;
}

/* Responsive */
@media (max-width: 768px) {
    #header h1 {
        font-size: 18px;
    }

    .tagline {
        font-size: 8px;
    }

    .section {
        padding: 20px;
    }

    .section h2 {
        font-size: 14px;
    }

    .retro-btn {
        font-size: 10px;
        padding: 12px;
    }

    .modal-content {
        padding: 25px;
    }

    .token-box code {
        font-size: 10px;
    }
}
