/* Soul Winning Page Styles */

.soul-counter-main {
    background: linear-gradient(135deg, var(--primary-color) 0%, #c41630 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(232, 27, 57, 0.3);
    margin-bottom: 40px;
}

.soul-counter-main h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.counter-display {
    font-size: 5rem;
    font-weight: 700;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.soul-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 40px 0;
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.soul-note {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin: 30px 0;
}

.soul-note p {
    margin: 0;
    color: #856404;
}

/* Ranking Section */
.ranking-section {
    margin-top: 80px;
    padding: 60px 0;
    background: var(--background-light);
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    border-radius: 10px;
}

.ranking-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.rank-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rank-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(232, 27, 57, 0.2);
}

.rank-card:first-child {
    border-top: 5px solid #FFD700;
}

.rank-card:nth-child(2) {
    border-top: 5px solid #C0C0C0;
}

.rank-card:nth-child(3) {
    border-top: 5px solid #CD7F32;
}

.rank-number {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(232, 27, 57, 0.3);
}

.rank-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 20px auto;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.rank-avatar.floating {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.rank-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info {
    margin-top: 15px;
}

.rank-name {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.rank-souls {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.soul-count {
    font-size: 1.5rem;
    font-weight: 700;
}

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

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

.modal-content {
    background-color: white;
    margin: auto;
    padding: 40px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideDown 0.3s ease;
}

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

.modal-close {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--primary-color);
}

.modal-form .form-group {
    margin-bottom: 25px;
}

.modal-form .form-group:last-of-type {
    margin-bottom: 15px;
}

.modal-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.modal-form input,
.modal-form textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.modal-form input[type="file"] {
    padding: 10px;
    cursor: pointer;
}

.modal-form input:focus,
.modal-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(232, 27, 57, 0.1);
}

.modal-form button[type="submit"] {
    width: 100%;
    margin-top: 15px;
}

.modal-form p {
    font-size: 0.85rem !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .counter-display {
        font-size: 3.5rem;
    }

    .soul-counter-main {
        padding: 40px 20px;
    }

    .soul-actions {
        flex-direction: column;
    }

    .soul-actions .btn {
        width: 100%;
    }

    .ranking-container {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 25px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .counter-display {
        font-size: 2.5rem;
    }

    .soul-counter-main h2 {
        font-size: 1.5rem;
    }

    .soul-counter-main {
        padding: 30px 15px;
    }

    .rank-avatar {
        width: 100px;
        height: 100px;
    }

    .rank-name {
        font-size: 1.1rem;
    }

    .modal-content {
        padding: 20px;
        width: 98%;
        margin: 10px;
        border-radius: 12px;
    }

    .modal-form .form-group {
        margin-bottom: 20px;
    }

    .modal-form label {
        font-size: 0.9rem;
    }

    .modal-form input,
    .modal-form textarea {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .modal-form input[type="file"] {
        padding: 8px;
    }

    .modal-close {
        font-size: 30px;
        top: 10px;
        right: 15px;
    }

    .modal-form button[type="submit"] {
        padding: 14px;
        font-size: 0.95rem;
    }

    .soul-note {
        padding: 15px;
        margin: 20px 0;
    }

    .soul-actions {
        flex-direction: column;
        gap: 15px;
    }

    .soul-actions .btn {
        width: 100%;
        font-size: 0.95rem;
    }
}
