﻿/* Enhanced Student Page Styles */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

.student-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    overflow: hidden;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.float-element {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
    opacity: 0.7;
}

    .float-element:nth-child(1) {
        top: 20%;
        left: 10%;
        animation-delay: 0s;
    }

    .float-element:nth-child(2) {
        top: 10%;
        right: 15%;
        animation-delay: 1s;
    }

    .float-element:nth-child(3) {
        top: 60%;
        left: 5%;
        animation-delay: 2s;
    }

    .float-element:nth-child(4) {
        top: 70%;
        right: 10%;
        animation-delay: 3s;
    }

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-20px) rotate(5deg);
    }

    66% {
        transform: translateY(10px) rotate(-3deg);
    }
}

.hero-image-container {
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.hero-image {
    max-width: 100%;
    height: auto;
    max-height: 250px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.main-title {
    font-size: clamp(1.8rem, 6vw, 3rem);
    font-weight: 900;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

.gradient-text {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.highlight-text {
    color: white;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    display: block;
}

/* Student Info Card */
.student-info-card {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 25px;
    margin: 20px auto;
    max-width: 500px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.student-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.student-details-text {
    flex: 1;
    text-align: left;
}

.student-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 10px 0;
}

.student-class {
    font-size: 1.1rem;
    color: #4a5568;
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.learning-goal {
    background: linear-gradient(135deg, #f0fff4, #c6f6d5);
    padding: 12px 15px;
    border-radius: 15px;
    margin-top: 15px;
    border-left: 4px solid #4ecdc4;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.goal-text {
    font-size: 1rem;
    color: #2d3748;
    font-weight: 500;
    line-height: 1.5;
}

/* Progress Section */
.progress-section {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    text-align: center;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 25px;
    text-align: center;
}

.progress-container {
    max-width: 400px;
    margin: 0 auto;
}

.progress-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: #4ecdc4;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: 1rem;
    color: #4a5568;
    font-weight: 600;
    margin-top: 5px;
}

.stat-divider {
    font-size: 1.5rem;
    color: #a0aec0;
    font-weight: 500;
}

.modern-progress-bar {
    position: relative;
    margin-bottom: 15px;
}

.progress-track {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #44a08d);
    border-radius: 25px;
    transition: width 1.5s ease-in-out;
    position: relative;
    overflow: hidden;
}

    .progress-fill::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        animation: shimmer 2s infinite;
    }

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-percentage {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin-top: 10px;
}

/* Sponsorship Section */
.sponsorship-section {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-subtitle {
    color: #4a5568;
    font-size: 1.1rem;
    margin-top: 10px;
    font-weight: 500;
}

/* Selected Summary */
.selected-summary {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(255, 154, 158, 0.3);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.summary-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.clear-selection-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.5);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

    .clear-selection-btn:hover {
        background: rgba(255,255,255,0.3);
        border-color: white;
        transform: translateY(-2px);
    }

.selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.selected-item {
    background: rgba(255,255,255,0.9);
    border-radius: 25px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.selected-amount {
    font-weight: 700;
    color: #2d3748;
}

.remove-item-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

    .remove-item-btn:hover {
        background: #ee5a52;
        transform: scale(1.1);
    }

.summary-total {
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.total-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a5568;
}

.total-amount {
    font-size: 1.5rem;
    font-weight: 900;
    color: #4ecdc4;
}

.sponsor-now-btn {
    width: 100%;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border: none;
    padding: 18px 25px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .sponsor-now-btn:hover:not(:disabled) {
        background: linear-gradient(135deg, #44a08d, #4ecdc4);
        transform: translateY(-3px);
        box-shadow: 0 12px 30px rgba(78, 205, 196, 0.6);
    }

    .sponsor-now-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

/* Sponsorship Grid */
.sponsorship-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.sponsorship-tile {
    border: 3px solid transparent;
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .sponsorship-tile::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
        background-size: 15px 15px;
        animation: sparkle 10s linear infinite;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sponsorship-tile:hover::before {
        opacity: 1;
    }

@keyframes sparkle {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Tile States */
.sponsorship-tile.available {
    background: linear-gradient(135deg, #f0fff4, #c6f6d5);
    border-color: #4ecdc4;
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.2);
}

    .sponsorship-tile.available:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 15px 30px rgba(78, 205, 196, 0.4);
        border-color: #44a08d;
    }

.sponsorship-tile.selected {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    border-color: #2d3748;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(78, 205, 196, 0.5);
    color: white;
}

.sponsorship-tile.sponsored {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e0);
    border-color: #a0aec0;
    cursor: default;
    color: #4a5568;
}

.sponsorship-tile.locked {
    background: linear-gradient(135deg, #fef5e7, #fed7aa);
    border-color: #f6ad55;
    cursor: default;
    color: #744210;
}

.sponsorship-tile.closed {
    background: linear-gradient(135deg, #fed7d7, #feb2b2);
    border-color: #fc8181;
    cursor: default;
    color: #742a2a;
}

.tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tile-amount {
    font-size: 1.3rem;
    font-weight: 900;
}

.selected-indicator {
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
}

.tile-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sponsor-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    word-break: break-word;
}

.tile-status {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

    .tile-status.available {
        background: rgba(78, 205, 196, 0.2);
        color: #2d3748;
    }

    .tile-status.sponsored {
        background: rgba(72, 187, 120, 0.2);
        color: #22543d;
    }

    .tile-status.pending {
        background: rgba(246, 173, 85, 0.2);
        color: #744210;
    }

    .tile-status.closed {
        background: rgba(252, 129, 129, 0.2);
        color: #742a2a;
    }

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #f6ad55;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Actions Section */
.actions-section {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.certificate-btn, .instructions-btn {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
    border: none !important;
    padding: 15px 25px !important;
    border-radius: 25px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

    .certificate-btn:hover:not(:disabled), .instructions-btn:hover {
        background: linear-gradient(135deg, #764ba2, #667eea) !important;
        transform: translateY(-3px) !important;
        box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6) !important;
    }

    .certificate-btn:disabled {
        opacity: 0.6 !important;
        cursor: not-allowed !important;
        transform: none !important;
    }

/* About Section */
.about-section {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.about-content p {
    color: #4a5568;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.fancy-link {
    color: #4ecdc4;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    border-bottom: 2px solid transparent;
}

    .fancy-link:hover {
        color: #ff6b6b;
        border-bottom-color: #ff6b6b;
    }

/* Share Section */
.share-section {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    text-align: center;
}

.qr-and-buttons {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 25px;
}

.qr-container {
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 140px;
    justify-content: center;
}

    .share-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    }

    .share-btn.facebook {
        background: linear-gradient(135deg, #3b5998, #2d4373);
    }

    .share-btn.twitter {
        background: linear-gradient(135deg, #1da1f2, #0d95e8);
    }

    .share-btn.email {
        background: linear-gradient(135deg, #4ecdc4, #44a08d);
    }

.share-icon {
    font-size: 1.2rem;
}

/* Rankings Section */
.rankings-section {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.chart-container {
    background: #2d3748;
    border-radius: 15px;
    padding: 20px;
    margin-top: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Payment Dialog */
.payment-dialog ::deep .e-dialog {
    border-radius: 20px !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3) !important;
}

.payment-form {
    padding: 0;
}

.payment-header {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    padding: 25px 30px;
    border-radius: 20px 20px 0 0;
    margin: -1px -1px 0 -1px;
    text-align: center;
}

    .payment-header h3 {
        margin: 0 0 10px 0;
        font-size: 1.8rem;
        font-weight: 700;
    }

.payment-subtitle {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.payment-summary {
    background: #f8f9fa;
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
}

    .payment-summary h4 {
        margin: 0 0 15px 0;
        color: #2d3748;
        font-size: 1.3rem;
    }

.summary-items {
    margin-bottom: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

.summary-total-line {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-weight: 700;
    font-size: 1.1rem;
    color: #2d3748;
    border-top: 2px solid #4ecdc4;
}

.form-section {
    padding: 25px 30px;
}

    .form-section h4 {
        color: #2d3748;
        font-size: 1.2rem;
        margin: 0 0 20px 0;
        padding-bottom: 10px;
        border-bottom: 2px solid #e2e8f0;
    }

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        color: #4a5568;
        font-weight: 600;
        font-size: 1rem;
    }

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

    .form-control:focus {
        border-color: #4ecdc4;
        box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
        outline: none;
    }

#dialog-card-container {
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    min-height: 45px;
    transition: border-color 0.3s ease;
}

    #dialog-card-container:focus-within {
        border-color: #4ecdc4;
        box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
    }

#card-errors {
    color: #e53e3e;
    font-size: 0.9rem;
    margin-top: 8px;
    font-weight: 500;
}

.payment-notice {
    background: linear-gradient(135deg, #bee3f8, #90cdf4);
    padding: 20px;
    margin: 0 30px 25px 30px;
    border-radius: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.notice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.notice-text p {
    margin: 0;
    color: #2d3748;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 500;
}

.dialog-buttons {
    padding: 0 30px 30px 30px;
    display: flex;
    gap: 15px;
}

.submit-payment-btn {
    flex: 1;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .submit-payment-btn:hover:not(:disabled) {
        background: linear-gradient(135deg, #44a08d, #4ecdc4);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(78, 205, 196, 0.4);
    }

    .submit-payment-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.cancel-payment-btn {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .cancel-payment-btn:hover:not(:disabled) {
        background: #cbd5e0;
        transform: translateY(-2px);
    }

.secure-payment-badge {
    text-align: center;
    padding: 0 30px 20px 30px;
}

    .secure-payment-badge img {
        max-width: 180px;
        height: auto;
        opacity: 0.8;
    }

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Error States */
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.error-state
