/* ==========================================================================
   CSS Reset and Base 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;
    color: #333;
}

/* ==========================================================================
   Layout and Container
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================================================
   Header and Navigation
   ========================================================================== */

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

h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.back-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    transition: background 0.3s ease;
}

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

/* ==========================================================================
   Tab System
   ========================================================================== */

.tab-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.tab {
    flex: 1;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
    position: relative;
}

.tab:hover {
    background: #e9ecef;
    color: #495057;
}

.tab.active {
    color: #667eea;
    background: white;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
}

.tab-content {
    padding: 40px;
    min-height: 400px;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.content-section.active {
    display: block;
}

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

/* ==========================================================================
   Card Components
   ========================================================================== */

.card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.card h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.project-card, .tool-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.project-card:hover, .tool-card:hover {
    transform: translateY(-5px);
}

.project-card h4, .tool-card h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.tool-card {
    text-align: center;
}

.tool-card p {
    margin-bottom: 20px;
}

/* ==========================================================================
   Contact Components
   ========================================================================== */

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* ==========================================================================
   Grid Systems
   ========================================================================== */

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-grid, .tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* ==========================================================================
   Skill and Tag Components
   ========================================================================== */

.skill-item {
    background: #667eea;
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.tech-tag {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin: 5px 5px 0 0;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.skills-header,
.projects-header,
.experience-header,
.contact-header,
.tools-header {
    margin-bottom: 30px;
    color: #667eea;
}

/* ==========================================================================
   Content Styling
   ========================================================================== */

.contact-intro {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.project-tech-tags {
    margin-top: 15px;
}

.experience-details {
    margin-top: 10px;
}

/* ==========================================================================
   Button Components
   ========================================================================== */

.tool-link {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.tool-link:hover {
    background: #5a6fd8;
}

.upload-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 15px;
}

.upload-btn:hover {
    background: #5a6fd8;
}

.download-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin: 0 10px 10px 0;
    transition: background 0.3s ease;
}

.download-btn:hover {
    background: #218838;
}

.download-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* ==========================================================================
   Tool-Specific Components
   ========================================================================== */

/* Upload Section */
.upload-section {
    text-align: center;
    border: 2px dashed #e9ecef;
    transition: all 0.3s ease;
}

.upload-section.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

#fileInput {
    display: none;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: #667eea;
    transition: width 0.3s ease;
    width: 0%;
}

/* Configuration Groups */
.config-group {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #667eea;
}

.config-group h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row label {
    font-weight: 600;
    color: #495057;
}

.form-row input, .form-row select {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 120px;
}

.form-row input[type="checkbox"] {
    width: auto;
    transform: scale(1.2);
}

.form-row input[type="color"] {
    width: 50px;
    height: 35px;
    padding: 2px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

/* Coordinate Input */
.coordinates-section {
    margin-bottom: 20px;
}

.coordinates-section p {
    margin-bottom: 20px;
    color: #6c757d;
}

.coord-input {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.coord-input div {
    display: flex;
    flex-direction: column;
}

.coord-input label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.coord-input input {
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
}

/* Browser Location */
.browser-location {
    text-align: center;
}

.location-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.location-btn:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
}

.location-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.location-status {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
    min-height: 20px;
}

.location-status.info {
    background: #d1ecf1;
    color: #0c5460;
}

.location-status.success {
    background: #d4edda;
    color: #155724;
}

.location-status.error {
    background: #f8d7da;
    color: #721c24;
}

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

.location-display {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.location-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #495057;
}

.use-location-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.use-location-btn:hover {
    background: #5a6fd8;
}

/* ==========================================================================
   Information Panels
   ========================================================================== */

.info-panel, .error-panel, .success-panel {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.info-panel {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.error-panel {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.success-panel {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

/* ==========================================================================
   Preview and Media
   ========================================================================== */

.preview-section {
    text-align: center;
    margin-top: 30px;
}

.image-preview {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    /* Layout Adjustments */
    h1 {
        font-size: 2rem;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    /* Tab System */
    .tabs {
        flex-direction: column;
    }
    
    /* Grid Adjustments */
    .tools-grid,
    .config-grid,
    .coord-input {
        grid-template-columns: 1fr;
    }
    
    /* Form Adjustments */
    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .form-row input, .form-row select {
        width: 100%;
    }
    
    /* Browser Location Adjustments */
    .location-info {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
} 