/* Modern B1 Textkorrektur System - Enhanced Attractive Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #03192f 0%, #46008c 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-light: 0 8px 32px rgba(31, 38, 135, 0.37);
    --shadow-medium: 0 15px 35px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #4800ff 0%, #eeeeee 50%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    padding: 20px;
    color: #1a202c;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

h1 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 40px;
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}



h2 {
    color: #ffffff;
    margin-bottom: 24px;
    font-size: 2.2rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
    animation: expandWidth 0.6s ease-out;
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 80px; }
}

h3 {
    color: #000000;
    margin-bottom: 16px;
    font-size: 1.6rem;
    font-weight: 600;
}

/* Enhanced Letter Box Sections */
.section {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 32px;
    margin-bottom: 32px;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}



/* Enhanced Template Letter Styles */
.template-letter {
    background: rgba(255, 255, 255, 0.95);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: pre-line;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-size: 20px;
    line-height: 1.8;
    font-weight: 500;
}



/* Enhanced Form Elements */
select {
    width: 100%;
    padding: 18px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-weight: 500;
    color: #4a5568;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 56px;
    box-shadow: var(--shadow-light);
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}



textarea {
    width: 100%;
    padding: 28px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 1.5rem;
    font-family: inherit;
    resize: none;
    height: 800px;
    line-height: 1.8;
    background: rgba(255, 255, 255, 0.9);
    color: #2d3748;
    font-weight: 400;
    box-shadow: var(--shadow-light);
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 0.95);
}

textarea::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* Enhanced Button */
button {
    background: var(--primary-gradient);
    color: white;
    padding: 18px 36px;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}





/* Enhanced Word Counter */
.word-count {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

#wordCount {
    background: var(--primary-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: var(--shadow-light);
}

/* Enhanced Result Container Styles */
.result-container {
    font-family: 'Poppins', sans-serif;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.overall-grade {
    background: var(--primary-gradient);
    color: white;
    padding: 32px;
    border-radius: 20px;
    text-align: center;
    margin: 24px 0;
    box-shadow: var(--shadow-heavy);
    position: relative;
    overflow: hidden;
}

.overall-grade::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.overall-score {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 16px 0;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.status {
    font-size: 1.3em;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 30px;
    display: inline-block;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-light);
}

.passed {
    background: var(--success-gradient);
    color: white;
    animation: pulse 2s infinite;
}

.failed {
    background: var(--danger-gradient);
    color: white;
    animation: shake 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.grades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.grade-item {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}



.grade-label {
    font-weight: 600;
    color: #ffffff;
    font-size: 1.1em;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.grade-score {
    font-size: 2rem;
    color: #ffffff;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.text-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 24px 0;
}

.text-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
    font-size: 1.25rem;
}



.text-box h4 {
    margin-top: 0;
    color: #ffffff;
    font-size: 1.3em;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 16px;
}

.text-box p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.comments {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    margin: 24px 0;
    box-shadow: var(--shadow-light);
}

.comment-item {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    position: relative;
    overflow: hidden;
    font-size: 1.25rem;
}

.original-text {
    color: #ff6b6b;
    font-weight: 600;
}

.corrected-text {
    color: #51cf66;
    font-weight: 600;
}

.evaluation-text {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 28px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    white-space: pre-line;
    margin: 24px 0;
    box-shadow: var(--shadow-light);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-size: 20px;
    font-weight: 500;
}

/* Enhanced Pre-formatted text */
pre {
    background: rgba(255, 255, 255, 0.95);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #2d3748;
    box-shadow: var(--shadow-light);
}



/* Enhanced Scrollbars */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 5px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}



/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 24px;
        margin: 10px;
    }

    h1 {
        font-size: 2.5rem;
    }

    .section {
        padding: 20px;
    }

    button {
        width: 100%;
        padding: 16px 24px;
    }

    textarea {
        height: 300px;
        font-size: 16px;
        padding: 20px;
    }

    .text-comparison {
        grid-template-columns: 1fr;
    }

    .grades-grid {
        grid-template-columns: 1fr;
    }

    .overall-score {
        font-size: 2.5rem;
    }
}

/* Enhanced Loading Animation */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading Bar Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-modal {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-heavy);
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: modalFadeIn 0.3s ease-out;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.loading-text {
    color: #ffffff;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.loading-gif {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
}

.loading-gif .tenor-gif-embed {
    max-width: 400px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
    display: block;
}

.loading-progress {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.loading-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    animation: loadingProgress 2s ease-in-out infinite;
    position: relative;
}

.loading-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes loadingProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Enhanced Form Validation */
input:invalid, textarea:invalid {
    border-color: #ff6b6b;
    animation: shake 0.5s ease-in-out;
}

input:valid, textarea:valid {
    border-color: #51cf66;
}

/* Enhanced Focus Styles */
button:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3);
}

/* Enhanced Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .container {
        box-shadow: none;
        border: 1px solid #ccc;
        background: white;
    }

    button, select {
        display: none;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Additional Enhancements */
.letter-box {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 32px;
    margin-bottom: 32px;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}





/* Message Styles */
.message {
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 12px;
    font-weight: 500;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.message.error {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 87, 87, 0.2));
    color: #ffffff;
    border-color: rgba(255, 107, 107, 0.5);
}

.message.success {
    background: linear-gradient(135deg, rgba(81, 207, 102, 0.2), rgba(69, 233, 123, 0.2));
    color: #ffffff;
    border-color: rgba(81, 207, 102, 0.5);
}

/* Result Section */
.result {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 32px;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    margin-top: 32px;
    box-shadow: var(--shadow-light);
}



/* Word Count Display */
#wordCountDisplay {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 12px 20px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    margin-top: 20px;
    font-weight: 600;
    font-size: 16px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

#wordCount {
    color: #ffffff;
    font-weight: 700;
    margin-left: 4px;
    background: var(--primary-gradient);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 14px;
} 

.highlight-error {
    color: #ff6b6b;
    font-weight: bold;
} 

#submitBtn {
    display: block;
    margin: 32px auto 0 auto;
    font-size: 2.5rem;
} 

 