/*!
 * Tez Qadam AI Builder - Perfect Responsive Design
 * Version: 2.2.0
 * Author: Tez Qadam
 * Beautiful, Clean, Cool & Zabardast! 🚀
 */

/* ==========================================================================
   CSS Reset & Responsive Base Styles
   ========================================================================== */

.tez-qadam-container,
.tez-qadam-container *,
.tez-qadam-container *::before,
.tez-qadam-container *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smart responsive container */
.tez-qadam-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: transparent;
    overflow-x: hidden;
    position: relative;
    text-rendering: optimizeLegibility;
}

/* Mobile: Full width, edge-to-edge */
@media (max-width: 768px) {
    .tez-qadam-container {
        width: 100vw;
        margin: 0;
        padding: 0;
        left: 50% !important;
        right: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        max-width: none !important;
    }
}

/* Desktop: Contained with margins */
@media (min-width: 769px) {
    .tez-qadam-container {
        max-width: 1200px;
        margin: 40px auto;
        padding: 0 25px;
    }
}

/* Error Message Styles */
.tez-error-message {
    background: linear-gradient(135deg, #fef5e7 0%, #fed7aa 100%);
    color: #c2410c;
    padding: 20px 25px;
    border-radius: 16px;
    border-left: 5px solid #ea580c;
    margin: 20px 0;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 8px 25px rgba(234, 88, 12, 0.15);
    animation: tezSlideIn 0.4s ease;
}

/* ==========================================================================
   Spectacular Header Section
   ========================================================================== */

.tez-header {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 60%, #f5576c 100%);
    background-size: 400% 400%;
    animation: tezGradientFlow 25s ease infinite;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Mobile header: Full width, no radius */
@media (max-width: 768px) {
    .tez-header {
        padding: 60px 20px 50px;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}

/* Desktop header: Rounded, contained */
@media (min-width: 769px) {
    .tez-header {
        padding: 80px 50px 60px;
        margin-bottom: 50px;
        border-radius: 30px;
        min-height: auto;
    }
}

@keyframes tezGradientFlow {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

/* Magical floating background elements */
.tez-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: tezMagicFloat 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes tezMagicFloat {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1) rotate(0deg); 
    }
    33% { 
        opacity: 0.8; 
        transform: scale(1.05) rotate(120deg); 
    }
    66% { 
        opacity: 0.9; 
        transform: scale(0.95) rotate(240deg); 
    }
}

/* Sparkling particles effect */
.tez-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(3px 3px at 25px 35px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 50px 75px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 100px 45px, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 150px 85px, rgba(255,255,255,0.3), transparent);
    background-repeat: repeat;
    background-size: 200px 120px;
    animation: tezSparkle 35s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes tezSparkle {
    0% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    50% { transform: translateY(-25px) translateX(-15px) rotate(180deg); }
    100% { transform: translateY(0px) translateX(0px) rotate(360deg); }
}

.tez-header h1 {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 900;
    margin-bottom: 25px;
    background: linear-gradient(45deg, #ffffff 0%, #ffd700 20%, #ff6b6b 40%, #4ecdc4 60%, #9b59b6 80%, #ffffff 100%);
    background-size: 500% 500%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: tezRainbowMagic 8s ease infinite;
    text-shadow: none;
    line-height: 1.1;
    letter-spacing: -2px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

@keyframes tezRainbowMagic {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

.tez-emoji {
    display: inline-block;
    animation: tezMagicalBounce 4s ease-in-out infinite;
    font-style: normal;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

@keyframes tezMagicalBounce {
    0%, 100% { 
        transform: translateY(0px) scale(1) rotate(0deg); 
    }
    25% { 
        transform: translateY(-15px) scale(1.15) rotate(10deg); 
    }
    50% { 
        transform: translateY(-8px) scale(1.05) rotate(-5deg); 
    }
    75% { 
        transform: translateY(-12px) scale(1.1) rotate(8deg); 
    }
}

.tez-subtitle {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    opacity: 0.95;
    max-width: 900px;
    margin: 0 auto 40px;
    line-height: 1.7;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
    font-weight: 400;
    padding: 0 20px;
}

/* ==========================================================================
   Beautiful Features Grid
   ========================================================================== */

.tez-features {
    display: grid;
    gap: 25px;
    margin-top: 45px;
    position: relative;
    z-index: 2;
}

/* Mobile: Single column */
@media (max-width: 480px) {
    .tez-features {
        grid-template-columns: 1fr;
        padding: 0 20px;
        gap: 20px;
    }
}

/* Tablet: Two columns */
@media (min-width: 481px) and (max-width: 768px) {
    .tez-features {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px;
    }
}

/* Desktop: Four columns */
@media (min-width: 769px) {
    .tez-features {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
    }
}

.tez-feature {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    padding: 30px 25px;
    border-radius: 20px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tez-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.8s ease;
}

.tez-feature:hover::before {
    left: 100%;
}

.tez-feature:hover {
    transform: translateY(-12px) scale(1.05);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.6);
}

.tez-feature-icon {
    font-size: 3rem;
    margin-bottom: 18px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
    animation: tezIconMagic 5s ease-in-out infinite;
}

@keyframes tezIconMagic {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1); 
    }
    25% { 
        transform: translateY(-8px) rotate(5deg) scale(1.05); 
    }
    75% { 
        transform: translateY(-4px) rotate(-3deg) scale(1.02); 
    }
}

.tez-feature h4 {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: none;
    line-height: 1.3;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.tez-feature p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 400;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ==========================================================================
   Gorgeous Main Card Section
   ========================================================================== */

.tez-main-section {
    position: relative;
}

/* Mobile: Full width background */
@media (max-width: 768px) {
    .tez-main-section {
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
        padding: 50px 0;
        margin: 0;
    }
}

/* Desktop: No background (card has its own) */
@media (min-width: 769px) {
    .tez-main-section {
        padding: 0;
        margin: 0;
    }
}

.tez-main-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-radius: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 20px 70px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.4);
    transition: all 0.5s ease;
}

/* Mobile padding */
@media (max-width: 768px) {
    .tez-main-card {
        margin: 0 20px;
        padding: 40px 30px;
    }
}

/* Desktop padding */
@media (min-width: 769px) {
    .tez-main-card {
        padding: 60px 50px;
        margin-bottom: 50px;
    }
}

/* Magical top border animation */
.tez-main-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #feca57, #fd79a8, #a29bfe);
    animation: tezMagicShimmer 5s ease infinite;
}

@keyframes tezMagicShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.tez-main-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 35px 90px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(102, 126, 234, 0.6);
}

.tez-section-title {
    color: #2d3748;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    margin-bottom: 40px;
    font-weight: 800;
    text-align: center;
    position: relative;
    text-transform: none;
    line-height: 1.2;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 50%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tez-section-title::before {
    content: '🎯';
    margin-right: 15px;
    font-size: 0.8em;
    animation: tezTargetSpin 3s ease infinite;
    background: none;
    -webkit-text-fill-color: initial;
}

@keyframes tezTargetSpin {
    0%, 100% { transform: translateY(0px) scale(1) rotate(0deg); }
    50% { transform: translateY(-8px) scale(1.15) rotate(180deg); }
}

.tez-section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #4ecdc4);
    border-radius: 3px;
    background-size: 400% 100%;
    animation: tezUnderlineFlow 3s ease infinite;
}

@keyframes tezUnderlineFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* ==========================================================================
   Stunning Form Controls
   ========================================================================== */

.tez-input-group {
    margin-bottom: 35px;
}

.tez-input-group label {
    display: block;
    margin-bottom: 15px;
    color: #2d3748;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: none;
    line-height: 1.3;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Magnificent Type Selector */
.tez-type-selector {
    display: grid;
    gap: 25px;
    margin-bottom: 35px;
}

/* Mobile: Single column */
@media (max-width: 580px) {
    .tez-type-selector {
        grid-template-columns: 1fr;
    }
}

/* Desktop: Two columns */
@media (min-width: 581px) {
    .tez-type-selector {
        grid-template-columns: 1fr 1fr;
    }
}

.tez-type-option {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 4px solid #e2e8f0;
    border-radius: 22px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.tez-type-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.15), transparent);
    transition: left 1s ease;
}

.tez-type-option:hover::before {
    left: 100%;
}

.tez-type-option:hover {
    transform: translateY(-12px) scale(1.03);
    border-color: #667eea;
    box-shadow: 
        0 25px 60px rgba(102, 126, 234, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.tez-type-option.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 
        0 20px 50px rgba(102, 126, 234, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: tezMagicalPulse 2.5s ease infinite;
}

@keyframes tezMagicalPulse {
    0%, 100% { 
        box-shadow: 
            0 20px 50px rgba(102, 126, 234, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% { 
        box-shadow: 
            0 20px 50px rgba(102, 126, 234, 0.8),
            0 0 40px rgba(102, 126, 234, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.tez-type-option.selected h5,
.tez-type-option.selected p {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tez-type-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
    transition: all 0.4s ease;
    animation: tezIconGlow 4s ease-in-out infinite;
}

@keyframes tezIconGlow {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1);
        filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
    }
    50% { 
        transform: translateY(-6px) rotate(8deg) scale(1.05);
        filter: drop-shadow(0 8px 20px rgba(0,0,0,0.25));
    }
}

.tez-type-option:hover .tez-type-icon {
    transform: scale(1.15) rotate(12deg);
}

.tez-type-option h5 {
    color: #2d3748;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: none;
    line-height: 1.3;
}

.tez-type-option p {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 400;
    margin: 0;
}

/* Beautiful Text Input */
.tez-form-control {
    width: 100%;
    padding: 25px;
    border: 4px solid #e2e8f0;
    border-radius: 20px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.5s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
    box-shadow: 
        inset 0 2px 8px rgba(0,0,0,0.06),
        0 4px 20px rgba(0,0,0,0.04);
    box-sizing: border-box;
}

.tez-form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 
        0 0 0 6px rgba(102, 126, 234, 0.15),
        inset 0 2px 8px rgba(0,0,0,0.06),
        0 8px 30px rgba(102, 126, 234, 0.1);
    transform: translateY(-4px);
    background: linear-gradient(135deg, #fafbff 0%, #f0f4ff 100%);
}

.tez-char-counter {
    text-align: right;
    margin-top: 12px;
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* ==========================================================================
   Spectacular Generate Button
   ========================================================================== */

.tez-generate-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 20%, #fd79a8 40%, #a29bfe 60%, #6c5ce7 80%, #667eea 100%);
    background-size: 300% 300%;
    color: white;
    border: none;
    padding: 25px 60px;
    border-radius: 60px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.5px;
    box-shadow: 
        0 15px 40px rgba(255, 107, 107, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 70px;
    box-sizing: border-box;
    animation: tezButtonFlow 6s ease infinite;
}

@keyframes tezButtonFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.tez-generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 1s ease;
    z-index: -1;
}

.tez-generate-btn:hover::before {
    left: 100%;
}

.tez-generate-btn:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 25px 70px rgba(255, 107, 107, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.tez-generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(135deg, #a0a0a0 0%, #808080 100%);
    box-shadow: 0 8px 20px rgba(160, 160, 160, 0.3);
    animation: none;
}

.tez-generate-btn.tez-glow {
    animation: tezButtonMagicGlow 2s ease infinite, tezButtonFlow 6s ease infinite;
}

@keyframes tezButtonMagicGlow {
    0%, 100% { 
        box-shadow: 
            0 15px 40px rgba(255, 107, 107, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% { 
        box-shadow: 
            0 15px 40px rgba(255, 107, 107, 0.8),
            0 0 40px rgba(255, 107, 107, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.tez-btn-icon {
    font-size: 1.2rem;
    animation: tezIconMagicSpin 3s ease infinite;
}

@keyframes tezIconMagicSpin {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1.05); }
    75% { transform: rotate(270deg) scale(1.1); }
}

.tez-btn-text {
    font-weight: 700;
}

/* ==========================================================================
   Mesmerizing Loading Animation
   ========================================================================== */

.tez-loading {
    display: none;
    text-align: center;
    padding: 50px 35px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    margin: 30px 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tez-spinner-container {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.tez-spinner {
    width: 100px;
    height: 100px;
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid #fff;
    border-right: 8px solid #ff6b6b;
    border-bottom: 8px solid #4ecdc4;
    border-left: 8px solid #a29bfe;
    border-radius: 50%;
    animation: tezMagicSpin 2s linear infinite;
    margin-bottom: 25px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

@keyframes tezMagicSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tez-loading-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 25px 0;
}

.tez-loading-dots div {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    animation: tezMagicPulse 1.8s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tez-loading-dots div:nth-child(2) {
    animation-delay: 0.2s;
    background: linear-gradient(135deg, #ff6b6b, #fd79a8);
}

.tez-loading-dots div:nth-child(3) {
    animation-delay: 0.4s;
    background: linear-gradient(135deg, #4ecdc4, #45b7d1);
}

@keyframes tezMagicPulse {
    0%, 100% { 
        transform: scale(0.8); 
        opacity: 0.5; 
    }
    50% { 
        transform: scale(1.3); 
        opacity: 1; 
    }
}

.tez-loading-text {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 25px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tez-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 25px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.tez-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #4ecdc4);
    background-size: 400% 100%;
    width: 0%;
    animation: 
        tezMagicProgress 4s ease-in-out infinite,
        tezProgressFlow 2s ease infinite;
    border-radius: 4px;
}

@keyframes tezMagicProgress {
    0% { width: 0%; }
    50% { width: 75%; }
    100% { width: 100%; }
}

@keyframes tezProgressFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* ==========================================================================
   Elegant Status Messages
   ========================================================================== */

.tez-status-message {
    padding: 20px 30px;
    border-radius: 16px;
    margin: 25px 0;
    font-weight: 600;
    display: none;
    text-align: center;
    animation: tezMagicSlideIn 0.6s ease;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

@keyframes tezMagicSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(-25px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.tez-status-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-color: #c3e6cb;
    box-shadow: 0 8px 25px rgba(21, 87, 36, 0.15);
}

.tez-status-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-color: #f5c6cb;
    box-shadow: 0 8px 25px rgba(114, 28, 36, 0.15);
}

/* ==========================================================================
   Spectacular Result Section
   ========================================================================== */

.tez-result-section {
    display: none;
    margin-top: 40px;
    padding: 45px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-radius: 25px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* Mobile padding */
@media (max-width: 768px) {
    .tez-result-section {
        margin-top: 30px;
        padding: 35px 25px;
    }
}

.tez-result-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #00d2ff, #3a7bd5, #ff6b6b, #4ecdc4, #a29bfe);
    background-size: 400% 100%;
    animation: tezResultMagicShimmer 4s ease infinite;
}

@keyframes tezResultMagicShimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.tez-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

/* Mobile: Stack vertically */
@media (max-width: 580px) {
    .tez-result-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

.tez-result-header h4 {
    color: #2d3748;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    text-transform: none;
    line-height: 1.3;
    background: linear-gradient(135deg, #2d3748 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tez-result-header h4::before {
    content: '🎉';
    margin-right: 12px;
    animation: tezMagicCelebrate 2.5s ease infinite;
    background: none;
    -webkit-text-fill-color: initial;
}

@keyframes tezMagicCelebrate {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
    }
    25% { 
        transform: scale(1.2) rotate(15deg); 
    }
    50% { 
        transform: scale(1.1) rotate(-10deg); 
    }
    75% { 
        transform: scale(1.15) rotate(12deg); 
    }
}

.tez-result-meta {
    color: #718096;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(113, 128, 150, 0.1);
    border-radius: 20px;
}

.tez-code-container {
    position: relative;
    margin-bottom: 30px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tez-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: white;
    padding: 16px 25px;
    font-size: 1rem;
}

.tez-code-lang {
    font-weight: 600;
    color: #4ecdc4;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.tez-code-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.tez-code-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.tez-code-textarea {
    width: 100%;
    height: 450px;
    padding: 30px;
    border: none;
    border-top: 1px solid #4a5568;
    font-family: 'Monaco', 'Menlo', 'Consolas', 'JetBrains Mono', monospace;
    font-size: 14px;
    line-height: 1.7;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: #e2e8f0;
    resize: vertical;
    box-sizing: border-box;
    text-rendering: optimizeLegibility;
}

/* Mobile code textarea */
@media (max-width: 768px) {
    .tez-code-textarea {
        height: 350px;
        padding: 25px 20px;
        font-size: 13px;
    }
}

.tez-code-textarea:focus {
    outline: none;
    box-shadow: inset 0 0 0 3px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #1e2a3a 0%, #334155 100%);
}

/* Beautiful scrollbar */
.tez-code-textarea::-webkit-scrollbar {
    width: 16px;
}

.tez-code-textarea::-webkit-scrollbar-track {
    background: #2d3748;
    border-radius: 8px;
}

.tez-code-textarea::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 8px;
    border: 2px solid #2d3748;
}

.tez-code-textarea::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

/* ==========================================================================
   Gorgeous Action Buttons
   ========================================================================== */

.tez-action-buttons {
    display: grid;
    gap: 15px;
    margin-top: 30px;
}

/* Mobile: Single column */
@media (max-width: 580px) {
    .tez-action-buttons {
        grid-template-columns: 1fr;
    }
}

/* Tablet: Two columns */
@media (min-width: 581px) and (max-width: 768px) {
    .tez-action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: Four columns */
@media (min-width: 769px) {
    .tez-action-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
}

.tez-btn {
    padding: 16px 24px;
    border: none;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.5s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    min-height: 55px;
    box-sizing: border-box;
    font-family: inherit;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tez-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.tez-btn:hover::before {
    left: 100%;
}

.tez-btn:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.tez-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tez-btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.tez-btn-warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
}

.tez-btn-secondary {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    color: white;
}

/* ==========================================================================
   Magical Examples Section
   ========================================================================== */

.tez-examples-section {
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* Mobile: Full width, no radius */
@media (max-width: 768px) {
    .tez-examples-section {
        margin: 50px 0 0 0;
        padding: 60px 0;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
        border-radius: 0;
    }
}

/* Desktop: Rounded, with margin */
@media (min-width: 769px) {
    .tez-examples-section {
        margin-top: 60px;
        padding: 70px 50px;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
        backdrop-filter: blur(20px);
        border-radius: 30px;
        border: 3px solid rgba(255, 255, 255, 0.25);
    }
}

.tez-examples-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #feca57, #fd79a8);
    background-size: 400% 100%;
    animation: tezExampleMagicShimmer 5s ease infinite;
}

@keyframes tezExampleMagicShimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.tez-examples-title {
    color: white;
    text-align: center;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 20px;
    text-transform: none;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.tez-examples-title::before {
    content: '💡';
    margin-right: 15px;
    font-size: 0.8em;
    animation: tezLightBulb 3s ease infinite;
}

@keyframes tezLightBulb {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.1) rotate(10deg); 
        filter: brightness(1.3);
    }
}

.tez-examples-subtitle {
    color: rgba(255,255,255,0.9);
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.3rem;
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tez-examples-grid {
    display: grid;
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Mobile: Single column */
@media (max-width: 680px) {
    .tez-examples-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
}

/* Tablet: Two columns */
@media (min-width: 681px) and (max-width: 1024px) {
    .tez-examples-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px;
    }
}

/* Desktop: Three columns */
@media (min-width: 1025px) {
    .tez-examples-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tez-example-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    min-height: 140px;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.tez-example-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.tez-example-card:hover::before {
    transform: scaleX(1);
}

.tez-example-card:hover {
    transform: translateY(-12px) scale(1.03);
    background: white;
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-color: #667eea;
}

.tez-example-card h5 {
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 1.2rem;
    text-transform: none;
    line-height: 1.3;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tez-example-card p {
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 400;
    margin: 0;
}

/* ==========================================================================
   Enhanced Preview Modal
   ========================================================================== */

.tez-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    backdrop-filter: blur(15px);
    animation: tezMagicModalFadeIn 0.5s ease;
}

@keyframes tezMagicModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tez-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 1200px;
    height: 90%;
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 
        0 40px 120px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: tezMagicModalSlideIn 0.6s ease;
}

@keyframes tezMagicModalSlideIn {
    from { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.8) rotate(2deg); 
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1) rotate(0deg); 
    }
}

.tez-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tez-modal-header h4 {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    text-transform: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tez-modal-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.tez-modal-btn {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tez-modal-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.tez-close-btn {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: bold;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tez-close-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.tez-modal-body {
    height: calc(100% - 90px);
}

.tez-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================================================
   Utility Classes & Magical Animations
   ========================================================================== */

/* Animation utility classes */
.tez-pulse {
    animation: tezMagicalPulse 2.5s ease infinite;
}

@keyframes tezMagicalPulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); 
    }
    70% { 
        transform: scale(1.05); 
        box-shadow: 0 0 0 20px rgba(102, 126, 234, 0); 
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); 
    }
}

.tez-glow {
    box-shadow: 
        0 0 50px rgba(102, 126, 234, 0.8),
        0 0 100px rgba(102, 126, 234, 0.4) !important;
}

/* Fullscreen code editor */
.tez-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    background: white !important;
    padding: 20px !important;
    border-radius: 0 !important;
}

.tez-fullscreen .tez-code-textarea {
    height: calc(100vh - 140px) !important;
}

/* ==========================================================================
   Accessibility & Performance
   ========================================================================== */

/* Focus states for accessibility */
.tez-type-option:focus,
.tez-generate-btn:focus,
.tez-btn:focus,
.tez-example-card:focus {
    outline: 3px solid #667eea;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(102, 126, 234, 0.2);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tez-main-card {
        border-width: 4px;
        border-color: #000;
    }
    
    .tez-type-option {
        border-width: 4px;
        border-color: #000;
    }
    
    .tez-generate-btn {
        border: 4px solid #000;
    }
}

/* Print styles */
@media print {
    .tez-header,
    .tez-action-buttons,
    .tez-examples-section,
    .tez-loading,
    .tez-status-message {
        display: none !important;
    }
    
    .tez-main-card,
    .tez-result-section {
        box-shadow: none !important;
        border: 2px solid #000 !important;
        break-inside: avoid;
    }
    
    .tez-code-textarea {
        background: white !important;
        color: black !important;
        border: 1px solid #000 !important;
    }
}

/* Performance optimizations */
.tez-qadam-container {
    will-change: auto;
    contain: layout style paint;
}

.tez-header,
.tez-main-card,
.tez-examples-section {
    will-change: transform;
}

/* ==========================================================================
   End of Magical Styles ✨
   ========================================================================== */