* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Hexagon Background */
.hexagon-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hexagon {
    position: absolute;
    width: 100px;
    height: 57.74px;
    background: rgba(255, 255, 255, 0.3);
    margin: 28.87px 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    animation: float 6s ease-in-out infinite;
}

.hexagon:before,
.hexagon:after {
    content: "";
    position: absolute;
    width: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
}

.hexagon:before {
    bottom: 100%;
    border-bottom: 28.87px solid rgba(255, 255, 255, 0.3);
}

.hexagon:after {
    top: 100%;
    border-top: 28.87px solid rgba(255, 255, 255, 0.3);
}

.hex1 { top: 10%; left: 5%; animation-delay: 0s; }
.hex2 { top: 20%; left: 15%; animation-delay: 1s; }
.hex3 { top: 40%; left: 8%; animation-delay: 2s; }
.hex4 { top: 60%; left: 12%; animation-delay: 0.5s; }
.hex5 { top: 15%; right: 10%; animation-delay: 1.5s; }
.hex6 { top: 35%; right: 5%; animation-delay: 2.5s; }
.hex7 { top: 55%; right: 15%; animation-delay: 0.8s; }
.hex8 { top: 75%; right: 8%; animation-delay: 1.8s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Blue Corner Design */
.corner-design {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #003d7a 0%, #0051a5 100%);
    clip-path: polygon(100% 0, 100% 100%, 0 0);
    z-index: 1;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

/* Header Section */
.header-section {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 1s ease-out;
}

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

.header-section h1 {
    color: #003d7a;
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.header-section p {
    color: #555;
    font-size: 18px;
    font-weight: 400;
}

/* Form Card */
.form-card {
    background: white;
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 1s ease-out;
    position: relative;
    overflow: hidden;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #2196F3 0%, #1976D2 50%, #0D47A1 100%);
}

.form-title {
    text-align: center;
    color: #d32f2f;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2196F3;
    background: white;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-upload-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px dashed #2196F3;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #1976D2;
    font-weight: 600;
}

.file-upload-label:hover {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
    transform: translateY(-2px);
}

.file-name {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
    font-style: italic;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
    margin-top: 20px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(33, 150, 243, 0.6);
}

.submit-btn:active {
    transform: translateY(-1px);
}

/* Success Message */
.success-message {
    display: none;
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
    animation: slideIn 0.5s ease-out;
}

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

.success-message.show {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 30px 20px;
    }

    .header-section h1 {
        font-size: 32px;
    }

    .corner-design {
        width: 200px;
        height: 200px;
    }

    .hexagon {
        width: 60px;
        height: 34.64px;
        margin: 17.32px 0;
    }

    .hexagon:before,
    .hexagon:after {
        border-left: 30px solid transparent;
        border-right: 30px solid transparent;
    }

    .hexagon:before {
        border-bottom: 17.32px solid rgba(255, 255, 255, 0.3);
    }

    .hexagon:after {
        border-top: 17.32px solid rgba(255, 255, 255, 0.3);
    }
}

/* Loading Spinner */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.submit-btn.loading .spinner {
    display: block;
}

.submit-btn.loading span {
    display: none;
}


/* Fayl inputni yashirish */
input[type="file"] {
    display: none;
}

/* Custom fayl label */
.custom-file-upload {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    border: 2px dashed #1976D2;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: 0.3s;
    color: #1976D2;
    font-weight: bold;
}

.mb-2{
    margin:20px 10px;
}

.custom-file-upload:hover {
    background-color: #1976D2;
    color: white;
}

/* Fayl tanlanganini ko‘rsatish */
.file-label {
    display: inline-block;
    margin-left: 10px;
    font-weight: normal;
}

/* Fayl tanlanganida rangini o‘zgartirish */
input[type="file"]:valid + .file-label {
    color: #000;
}
