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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 25%, #7f8c8d 50%, #34495e 75%, #2c3e50 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 0;
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.login-gif {
    width: 100%;
    height: 200px;
    background: url('https://media.giphy.com/media/v1.Y2lkPTcZm2p4i4j2Rq/giphy.gif') center/cover;
    border-radius: 20px 20px 0 0;
    margin-bottom: 20px;
}

.login-content {
    padding: 40px;
}

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

.logo-section {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 1s ease-out 0.3s both;
}

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

.logo-section img.logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.logo-section img.company-name {
    width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.logo-section img.company-name.full-width {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    display: block;
}

.login-form h2 {
    color: #333;
    margin-bottom: 25px;
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    animation: fadeIn 1s ease-out 0.5s both;
}

.form-group {
    margin-bottom: 20px;
    animation: fadeIn 1s ease-out 0.7s both;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    animation: fadeIn 1s ease-out 0.9s both;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.copyright {
    text-align: center;
    margin-top: 20px;
    padding: 15px 0;
    font-size: 12px;
    color: #666;
    animation: fadeIn 1s ease-out 1.1s both;
}

.copyright a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.copyright a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

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

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.alert-info {
    background: #eef;
    color: #33c;
    border: 1px solid #ccf;
}

/* Construction-themed animated background */
.construction-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

/* Electrical switch gear panels */
.switch-gear {
    position: absolute;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 50%, #34495e 100%);
    border: 2px solid #7f8c8d;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    opacity: 0.2;
}

.switch-gear::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 30px;
    background: #1a1a1a;
    border-radius: 2px;
}

.switch-gear::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    height: 20px;
    background: repeating-linear-gradient(
        90deg,
        #e74c3c 0px,
        #e74c3c 8px,
        #27ae60 8px,
        #27ae60 16px
    );
    border-radius: 2px;
}

/* Electrical lights */
.electrical-light {
    position: absolute;
    width: 60px;
    height: 15px;
    background: linear-gradient(90deg, #f39c12, #e67e22, #f39c12);
    border-radius: 50% 50% 50% 50% / 100% 100% 100% 100%;
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.6);
    animation: lightFlicker 4s ease-in-out infinite;
}

.electrical-light::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: #7f8c8d;
}

@keyframes lightFlicker {
    0%, 100% { 
        opacity: 0.8; 
        box-shadow: 0 0 20px rgba(243, 156, 18, 0.6);
    }
    50% { 
        opacity: 1; 
        box-shadow: 0 0 30px rgba(243, 156, 18, 0.9);
    }
}

/* Enhanced electrical elements - animated circuit lines */
.circuit-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, #f39c12, transparent);
    height: 2px;
    animation: circuitFlow 8s linear infinite;
    opacity: 0.6;
}

.circuit-line::before,
.circuit-line::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #f39c12;
    border-radius: 50%;
    top: -3px;
    box-shadow: 0 0 10px #f39c12;
}

.circuit-line::before {
    left: 0;
    animation: pulse 2s ease-in-out infinite;
}

.circuit-line::after {
    right: 0;
    animation: pulse 2s ease-in-out infinite 1s;
}

@keyframes circuitFlow {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Power transformers */
.transformer {
    position: absolute;
    width: 50px;
    height: 40px;
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 50%, #95a5a6 100%);
    border: 2px solid #34495e;
    border-radius: 4px;
    opacity: 0.3;
}

.transformer::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 10px;
    width: 6px;
    height: 8px;
    background: #34495e;
    border-radius: 2px;
}

.transformer::after {
    content: '';
    position: absolute;
    top: -8px;
    right: 10px;
    width: 6px;
    height: 8px;
    background: #34495e;
    border-radius: 2px;
}

/* Enhanced crane with more details */
.crane {
    width: 4px;
    height: 180px;
    background: linear-gradient(to top, #7f8c8d, #95a5a6);
    position: absolute;
    bottom: 0;
    box-shadow: 2px 0 4px rgba(0,0,0,0.2);
}

.crane::before {
    content: '';
    position: absolute;
    top: 0;
    left: -60px;
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #7f8c8d, #95a5a6, #7f8c8d);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.crane::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -2px;
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 50px solid #7f8c8d;
    transform: translateX(-30px);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Crane cable and hook */
.crane .cable {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
    background: #34495e;
}

.crane .hook {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 12px;
    border: 2px solid #7f8c8d;
    border-radius: 0 0 8px 8px;
    border-top: none;
}

/* Construction tools and equipment */
.construction-element {
    position: absolute;
    opacity: 0.15;
    animation: floatConstruction 20s infinite ease-in-out;
}

.hard-hat {
    width: 40px;
    height: 35px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-radius: 50% 50% 20% 20%;
    position: absolute;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hard-hat::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 5px;
    right: 5px;
    height: 3px;
    background: #c0392b;
    border-radius: 2px;
}

.wrench {
    width: 35px;
    height: 8px;
    background: linear-gradient(90deg, #95a5a6, #bdc3c7, #95a5a6);
    position: absolute;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.wrench::before,
.wrench::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #7f8c8d, #95a5a6);
    border-radius: 50%;
    top: -2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.wrench::before {
    left: -6px;
}

.wrench::after {
    right: -6px;
}

/* Power drill */
.drill {
    width: 25px;
    height: 40px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border-radius: 4px;
    position: absolute;
}

.drill::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 12px;
    background: #34495e;
    border-radius: 2px;
}

.drill::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 8px;
    background: #2c3e50;
    border-radius: 2px;
}

/* Building structures */
.building-silhouette {
    position: absolute;
    bottom: 0;
    background: linear-gradient(to top, #34495e, transparent);
    opacity: 0.3;
}

/* Scaffolding */
.scaffolding {
    position: absolute;
    bottom: 0;
    width: 80px;
    height: 150px;
    opacity: 0.2;
}

.scaffolding::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: #7f8c8d;
}

.scaffolding::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: #7f8c8d;
}

.scaffolding .horizontal {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #7f8c8d;
}

/* Electrical bolts and sparks */
.electrical-bolt {
    position: absolute;
    width: 2px;
    height: 20px;
    background: linear-gradient(to bottom, #f39c12, #e67e22);
    animation: boltFlash 3s ease-in-out infinite;
    opacity: 0;
}

.electrical-bolt::before,
.electrical-bolt::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 2px;
    background: #f39c12;
    top: 50%;
    transform: translateY(-50%);
}

.electrical-bolt::before {
    left: -15px;
}

.electrical-bolt::after {
    right: -15px;
}

@keyframes boltFlash {
    0%, 90%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    95% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

/* Floating particles - dust and debris */
.dust-particle {
    position: absolute;
    background: rgba(149, 165, 166, 0.4);
    border-radius: 50%;
    animation: dustFloat 15s linear infinite;
}

@keyframes dustFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes floatConstruction {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, -15px) rotate(5deg);
    }
    50% {
        transform: translate(-15px, 10px) rotate(-3deg);
    }
    75% {
        transform: translate(10px, 20px) rotate(2deg);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 0;
        margin: 20px;
    }
    
    .login-gif {
        height: 150px;
    }
    
    .login-content {
        padding: 30px 20px;
    }
    
    .logo-section img.logo {
        width: 80px;
        margin-bottom: 15px;
    }
    
    .logo-section img.company-name {
        width: 150px;
        margin-bottom: 20px;
    }
    
    .logo-section img.company-name.full-width {
        width: 100%;
        margin: 10px 0;
    }
}
