/* Josh Tech Tools - Main Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    overflow: hidden;
    max-width: 1200px;
    width: 95%;
    margin: 20px;
    min-height: 600px;
}

/* Login Styles */
.login-container {
    padding: 3rem;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

input[type="text"], 
input[type="password"], 
select, 
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

input[type="text"]:focus, 
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
}

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

.login-btn, .generate-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.login-btn:hover, .generate-btn:hover {
    transform: translateY(-2px);
}

.generate-btn {
    margin-top: 1rem;
    max-width: 200px;
}

.error-message {
    color: #e74c3c;
    margin-top: 1rem;
    padding: 12px;
    background: #fdf2f2;
    border-radius: 6px;
    border: 1px solid #fadadd;
    display: none;
    font-weight: 500;
}

/* Dashboard Styles */
.dashboard {
    display: none;
    min-height: 600px;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.5rem;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn, .back-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 14px;
}

.logout-btn:hover, .back-btn:hover {
    background: rgba(255,255,255,0.3);
}

.back-btn {
    background: #6c757d;
    border: 1px solid #5a6268;
    margin-bottom: 1rem;
}

.back-btn:hover {
    background: #5a6268;
}

/* Main Menu Grid */
.main-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.menu-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.menu-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.menu-item p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.menu-item:hover p {
    color: rgba(255,255,255,0.9);
}

/* Tool Content Area */
.tool-content {
    display: none;
    padding: 0;
}

.page-content {
    display: block;
    padding: 2rem;
}

/* Tool Container */
.tool-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 1rem;
    border: 1px solid #e9ecef;
}

/* Form Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Buttons */
.copy-btn, .download-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 10px;
    margin-top: 10px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: #0056b3;
}

.download-btn {
    background: #28a745;
}

.download-btn:hover {
    background: #1e7e34;
}

/* Script Output */
.script-output {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    margin-top: 1rem;
    white-space: pre-wrap;
    max-height: 500px;
    overflow-y: auto;
    display: none;
    border: 1px solid #4a5568;
}

/* Instructions Box */
.instructions-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    font-size: 14px;
    display: none;
}

.instructions-box h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.instructions-box h4 {
    color: #495057;
    margin: 1rem 0 0.5rem 0;
    font-size: 1rem;
}

.instruction-steps {
    margin-bottom: 1.5rem;
}

.step {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    border-left: 4px solid #007bff;
}

.important-notes, .troubleshooting {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.important-notes {
    border-left: 4px solid #ffc107;
}

.troubleshooting {
    border-left: 4px solid #28a745;
}

.instructions-box ul {
    margin: 0.5rem 0 0 1rem;
    padding-left: 0;
}

.instructions-box li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.instructions-box code {
    background: #e9ecef;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #495057;
}

/* Alert Styles */
.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 10px 15px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    min-width: 200px;
    text-align: center;
}

.alert-error { background: #dc3545; }
.alert-success { background: #28a745; }
.alert-info { background: #007bff; }

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .container {
        margin: 10px;
    }
    
    .login-container {
        padding: 2rem 1.5rem;
    }
    
    .main-menu {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .page-content {
        padding: 1rem;
    }
    
    .header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tool-container {
        padding: 1rem;
    }
}