/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 40px;
    backdrop-filter: blur(10px);
}

/* Typography */
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Form styles */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 1.1rem;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fafbfc;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

textarea {
    height: 140px;
    resize: vertical;
    min-height: 100px;
}

/* Button styles */
button {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Result styles */
#result {
    margin-top: 30px;
    padding: 20px;
    border-radius: 10px;
    display: none;
    animation: slideIn 0.3s ease-out;
}

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

/* Result variants */
.spam {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border-left: 5px solid #c0392b;
}

.ham {
    background: linear-gradient(135deg, #00d2d3 0%, #54a0ff 100%);
    color: white;
    border-left: 5px solid #0097e6;
}

.error {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    color: #2f3542;
    border-left: 5px solid #ff6348;
}

.loading {
    background: linear-gradient(135deg, #a4b0be 0%, #57606f 100%);
    color: white;
    text-align: center;
    border-left: 5px solid #747d8c;
}

/* Result content */
#result p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

#result p:last-child {
    margin-bottom: 0;
}

#result strong {
    font-weight: 700;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 25px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    input[type="text"],
    textarea {
        padding: 12px;
        font-size: 16px;
    }
    
    button {
        padding: 12px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    label {
        font-size: 1rem;
    }
    
    #result {
        padding: 15px;
    }
}

/* Placeholder styles */
input::placeholder,
textarea::placeholder {
    color: #a0a0a0;
    font-style: italic;
}

/* Focus and hover effects */
.form-group {
    position: relative;
}

input[type="text"]:focus + label,
textarea:focus + label {
    color: #667eea;
}

/* Loading animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success and error icons */
.result-icon {
    font-size: 1.5rem;
    margin-right: 10px;
    display: inline-block;
}

/* Confidence bar */
.confidence-bar {
    width: 100%;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    transition: width 0.5s ease;
}