/* Motivation Elements Styling */

/* Motivational Panel */
.motivation-panel {
    background: linear-gradient(135deg, #2a0845, #6441a5);
    color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.motivation-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.motivation-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><polygon fill="rgba(255,255,255,0.03)" points="0,100 100,0 100,100"/></svg>');
    background-size: cover;
}

.motivation-panel::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    filter: blur(20px);
    opacity: 0.5;
    z-index: 1;
    animation: glow 8s infinite alternate;
}

@keyframes glow {
    0% { transform: translate(0, 0); opacity: 0.3; }
    50% { transform: translate(-30px, 30px); opacity: 0.5; }
    100% { transform: translate(-10px, -20px); opacity: 0.3; }
}

/* Quote Section */
.quote-container {
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.quote-text {
    font-size: 1.4rem;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 10px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.quote-text::before, .quote-text::after {
    content: '"';
    font-size: 2rem;
    opacity: 0.7;
}

.quote-author {
    font-size: 1rem;
    opacity: 0.8;
    text-align: right;
    margin-top: 10px;
}

/* Daily Affirmation */
.daily-affirmation {
    background: linear-gradient(135deg, #541388, #8f3985);
    color: white;
    text-align: center;
    padding: 15px;
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    font-weight: bold;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(143, 57, 133, 0.4);
    animation: pulse 2s infinite;
    position: relative;
    overflow: hidden;
}

.daily-affirmation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    animation: shimmerEffect 3s infinite;
}

@keyframes shimmerEffect {
    0% { transform: translateX(-100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

@keyframes pulse {
    0% {
        box-shadow: 0 5px 15px rgba(143, 57, 133, 0.4);
    }
    50% {
        box-shadow: 0 5px 25px rgba(143, 57, 133, 0.7);
    }
    100% {
        box-shadow: 0 5px 15px rgba(143, 57, 133, 0.4);
    }
}

/* Study Tip */
.study-tip-container {
    background-color: rgba(35, 35, 35, 0.8);
    border-left: 4px solid var(--warning-color);
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.study-tip-container::before {
    content: '💡';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    background-color: var(--warning-color);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(247, 181, 56, 0.4), 0 0 15px rgba(247, 181, 56, 0.6);
}

.study-tip {
    font-size: 1rem;
    line-height: 1.5;
    color: #e0e0e0;
}

/* Celebration Modal */
.celebration-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
    backdrop-filter: blur(5px);
}

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

.celebration-modal-closing {
    animation: fadeOut 0.5s forwards;
}

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

.celebration-content {
    background: linear-gradient(135deg, #313131, #1a1a1a);
    color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 30px rgba(156, 95, 255, 0.3);
    transform: scale(0.9);
    animation: scaleIn 0.3s forwards 0.2s;
    border: 1px solid rgba(156, 95, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.celebration-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 1;
}

@keyframes scaleIn {
    from { transform: scale(0.9); }
    to { transform: scale(1); }
}

.celebration-content h2 {
    margin-bottom: 15px;
    color: white;
    font-size: 2rem;
    border-bottom: none;
    text-shadow: 0 0 10px rgba(156, 95, 255, 0.5);
}

.celebration-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #e0e0e0;
}

.celebration-icon {
    font-size: 4rem;
    margin: 20px 0;
    animation: bounce 1s infinite alternate;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.celebration-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(156, 95, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.celebration-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: all 0.5s ease;
}

.celebration-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(156, 95, 255, 0.5);
}

.celebration-button:hover::before {
    left: 100%;
}

/* Achievements Section */
.achievements-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 30px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.achievements-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    z-index: 1;
}

.achievements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.achievements-title {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.achievements-count {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.achievement-badge {
    background-color: var(--surface-1);
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.achievement-badge.locked {
    filter: grayscale(100%);
    opacity: 0.6;
}

.achievement-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    background-color: var(--surface-2);
}

.achievement-badge.locked:hover {
    transform: translateY(-3px);
    filter: grayscale(80%);
}

.achievement-icon {
    font-size: 2.5rem;
    display: block;
    margin: 0 auto 10px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.achievement-name {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 1rem;
}

.achievement-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.achievement-badge.unlocked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        rgba(156, 95, 255, 0.2) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.achievement-badge.unlocked:hover::before {
    opacity: 1;
}

.achievement-badge.unlocked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%236d5aee"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>');
    background-size: contain;
    z-index: 2;
}

.new-achievement {
    animation: glowing 2s infinite;
}

@keyframes glowing {
    0% { box-shadow: 0 0 5px rgba(156, 95, 255, 0.5); }
    50% { box-shadow: 0 0 20px rgba(156, 95, 255, 0.8); }
    100% { box-shadow: 0 0 5px rgba(156, 95, 255, 0.5); }
}

/* Streak Counter */
.streak-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 15px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    z-index: 5;
}

.streak-flame {
    font-size: 1.5rem;
    animation: flicker 1.5s infinite alternate;
    filter: drop-shadow(0 0 5px rgba(255, 165, 0, 0.7));
}

@keyframes flicker {
    0%, 19%, 21%, 23%, 54%, 56%, 100% { opacity: 1; transform: scale(1); }
    20%, 22%, 55% { opacity: 0.7; transform: scale(0.9); }
}

.streak-count {
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 5px rgba(255, 165, 0, 0.5);
}

.streak-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Progress Bar Animation */
.progress-bar {
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(
        90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Study Timer */
.study-timer {
    text-align: center;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.timer-display {
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 15px 0;
    text-shadow: 0 0 10px rgba(156, 95, 255, 0.5);
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.timer-button {
    background: linear-gradient(135deg, #313131, #1a1a1a);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    min-width: 100px;
}

.timer-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.timer-button.pause {
    background: linear-gradient(135deg, #541388, #8f3985);
}

.timer-button.reset {
    background: linear-gradient(135deg, #313131, #1a1a1a);
}

/* Achievement Notification */
.achievement-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #313131, #1a1a1a);
    border-radius: var(--border-radius);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(156, 95, 255, 0.4);
    z-index: 1000;
    width: 300px;
    max-width: calc(100% - 40px);
    animation: slideIn 0.5s forwards, timerBar 5s linear;
    border: 1px solid rgba(156, 95, 255, 0.3);
    overflow: hidden;
}

.achievement-notification::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 1;
    animation: timerBar 5s linear forwards;
}

@keyframes timerBar {
    0% { width: 100%; }
    100% { width: 0%; }
}

@keyframes slideIn {
    from { transform: translateX(120%); }
    to { transform: translateX(0); }
}

.achievement-notification.hide {
    animation: slideOut 0.5s forwards;
}

@keyframes slideOut {
    from { transform: translateX(0); }
    to { transform: translateX(120%); }
}

.achievement-notification .achievement-icon {
    font-size: 2rem;
    margin: 0;
    animation: pop 0.5s;
    filter: drop-shadow(0 0 5px rgba(156, 95, 255, 0.5));
}

@keyframes pop {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.achievement-notification .achievement-info {
    flex: 1;
}

.achievement-notification .achievement-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--accent-color);
}

.achievement-notification .achievement-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 3px;
    color: white;
}

.achievement-notification .achievement-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Card Animation */
.subject-card {
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.subject-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        125deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 60%,
        transparent 100%
    );
    z-index: -1;
    transform: translateX(-100%);
    transition: transform 0.8s ease;
}

.subject-card:hover::after {
    transform: translateX(100%);
}

/* Media Queries */
@media screen and (max-width: 768px) {
    .quote-text {
        font-size: 1.2rem;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    
    .achievement-icon {
        font-size: 2rem;
    }
    
    .celebration-content h2 {
        font-size: 1.5rem;
    }
    
    .celebration-icon {
        font-size: 3rem;
    }
    
    .streak-counter {
        top: auto;
        bottom: 10px;
        right: 10px;
    }
} 