/* SafeRating System Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.search-box {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    gap: 10px;
}

#app-name-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.1em;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

#app-name-input:focus {
    border-color: #2c5364;
}

#search-button {
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: bold;
    background: linear-gradient(135deg, #2c5364 0%, #0f2027 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

#search-button:hover {
    transform: translateY(-2px);
}

#search-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.result-container {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

/* Color coding for different modes */
.result-mode-1 {
    border-left: 8px solid #dc3545;
    background: linear-gradient(to right, #f8d7da 0%, white 30%);
}

.result-mode-2 {
    border-left: 8px solid #ff9800;
    background: linear-gradient(to right, #fff3cd 0%, white 30%);
}

.result-mode-3-concerns {
    border-left: 8px solid #ffc107;
    background: linear-gradient(to right, #fff9e6 0%, white 30%);
}

.result-mode-3-clean {
    border-left: 8px solid #28a745;
    background: linear-gradient(to right, #d4edda 0%, white 30%);
}

.result-introduction {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 25px;
    white-space: pre-line;
    color: #212529;
}

.result-details {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.detail-row {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-label {
    font-weight: bold;
    color: #495057;
    margin-bottom: 5px;
}

.detail-value {
    color: #212529;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tag {
    background: #e9ecef;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.9em;
}

.tag-danger {
    background: #f8d7da;
    color: #721c24;
}

.tag-warning {
    background: #fff3cd;
    color: #856404;
}

.result-recommendation {
    font-size: 1.1em;
    font-weight: bold;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    white-space: pre-line;
    line-height: 1.6;
    color: #212529;
    border: 1px solid #dee2e6;
}

.report-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: #2c5364;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
}

.report-link:hover {
    background: #0f2027;
}

.loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c5364;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

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

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
}

.footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    opacity: 0.8;
}

.footer a {
    color: white;
    text-decoration: underline;
}

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

.form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #495057;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: #2c5364;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    color: #212529;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 5px;
}

.checkbox-label input {
    margin-right: 8px;
}

.btn {
    padding: 12px 30px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #2c5364 0%, #0f2027 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 83, 100, 0.4);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

/* Admin styles */
.admin-container {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.admin-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 2px solid #e9ecef;
}

.admin-section:last-child {
    border-bottom: none;
}

.admin-section h2 {
    margin-bottom: 20px;
    color: #495057;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

th {
    background: #f8f9fa;
    font-weight: bold;
    color: #495057;
}

tr:hover {
    background: #f8f9fa;
}

.action-btn {
    padding: 6px 12px;
    font-size: 0.9em;
    margin-right: 5px;
}

