/*
Theme Name: Instagram Downloader
Theme URI: https://example.com
Description: A standalone WordPress theme for downloading Instagram Posts, Reels, Stories & Highlights using RapidAPI
Version: 1.0.0
Author: Your Name
Author URI: https://example.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: instagram-downloader
*/

:root {
   --bg-color: #f9f9f9;
   --card-bg: #ffffff;
   --text-color: #111;
   --accent-color: #0095f6;
   --accent-hover: #007bb5;
   --error-color: #ed4956;
   --border-radius: 12px;
   --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
}

body {
   font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
   background-color: var(--bg-color);
   color: var(--text-color);
   line-height: 1.6;
}

.site-container {
   max-width: 600px;
   margin: 0 auto;
   padding: 2rem;
   min-height: 100vh;
   display: flex;
   flex-direction: column;
}

/* Header */
.site-header {
   text-align: center;
   margin-bottom: 3rem;
   margin-top: 2rem;
}

.site-header h1 {
   font-size: 2.5rem;
   font-weight: 800;
   letter-spacing: -1px;
   margin: 0 0 0.5rem 0;
}

.site-header h1 .highlight {
   background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
}

.site-header p {
   color: #666;
   margin: 0;
}

/* Tabs */
.tabs {
   display: flex;
   gap: 0.5rem;
   margin-bottom: 2rem;
   border-bottom: 2px solid #eee;
}

.tab-btn {
   flex: 1;
   background: transparent;
   color: #666;
   border: none;
   padding: 1rem;
   border-radius: 0;
   font-size: 0.95rem;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.2s;
   border-bottom: 3px solid transparent;
   position: relative;
   bottom: -2px;
}

.tab-btn:hover {
   background: transparent;
   color: var(--text-color);
}

.tab-btn.active {
   color: var(--accent-color);
   border-bottom-color: var(--accent-color);
   background: transparent;
}

.tab-content {
   display: none;
}

.tab-content.active {
   display: block;
}

/* Forms */
form {
   display: flex;
   flex-direction: column;
   gap: 1rem;
}

input[type="text"] {
   width: 100%;
   padding: 1rem 1.2rem;
   border: 1px solid #ddd;
   border-radius: var(--border-radius);
   font-size: 1rem;
   outline: none;
   transition: border-color 0.2s;
   background: var(--card-bg);
}

input[type="text"]:focus {
   border-color: var(--accent-color);
   box-shadow: 0 0 0 3px rgba(0, 149, 246, 0.1);
}

.radio-group {
   display: flex;
   gap: 1.5rem;
   justify-content: center;
   margin: 1rem 0;
}

.radio-group label {
   display: flex;
   align-items: center;
   gap: 0.5rem;
   cursor: pointer;
   font-weight: 500;
}

.radio-group input[type="radio"] {
   cursor: pointer;
   width: 18px;
   height: 18px;
}

button {
   background-color: var(--text-color);
   color: white;
   border: none;
   padding: 1rem;
   border-radius: var(--border-radius);
   font-size: 1rem;
   font-weight: 600;
   cursor: pointer;
   transition: background 0.2s;
   display: flex;
   justify-content: center;
   align-items: center;
}

button:hover {
   background-color: #000;
}

button:disabled {
   opacity: 0.7;
   cursor: not-allowed;
}

/* Results */
.result-section {
   display: flex;
   flex-direction: column;
   gap: 1.5rem;
   margin-top: 2rem;
}

.media-card {
   background: var(--card-bg);
   padding: 1rem;
   border-radius: var(--border-radius);
   box-shadow: var(--shadow);
   animation: fadeIn 0.4s ease;
}

.media-preview {
   width: 100%;
   border-radius: 8px;
   margin-bottom: 1rem;
   background: #f0f0f0;
   min-height: 200px;
   object-fit: cover;
   display: block;
}

.media-caption {
   margin: 0 0 1rem 0;
   color: #666;
   font-size: 0.9rem;
}

.btn-group {
   display: flex;
   gap: 0.5rem;
   flex-wrap: wrap;
}

.btn-download,
.btn-proxy {
   flex: 1;
   text-decoration: none;
   padding: 0.8rem;
   border-radius: 6px;
   text-align: center;
   font-weight: 600;
   font-size: 0.9rem;
   transition: background 0.2s;
}

.btn-download {
   background: var(--accent-color);
   color: white;
}

.btn-download:hover {
   background: var(--accent-hover);
}

.btn-proxy {
   background: #333;
   color: white;
}

.btn-copy {
   background: transparent;
   border: 1px solid #ddd;
   color: #555;
   padding: 0.8rem;
   border-radius: 6px;
   cursor: pointer;
   font-weight: 500;
}

.btn-copy:hover {
   background: #f5f5f5;
}

/* Utilities */
.hidden {
   display: none !important;
}

.error-msg {
   color: var(--error-color);
   font-weight: 500;
   margin-top: 1rem;
   padding: 1rem;
   background: rgba(237, 73, 86, 0.1);
   border-radius: 8px;
}

/* Loader */
.loader {
   width: 16px;
   height: 16px;
   border: 2px solid #fff;
   border-bottom-color: transparent;
   border-radius: 50%;
   display: inline-block;
   box-sizing: border-box;
   animation: rotation 1s linear infinite;
}

@keyframes rotation {
   0% {
      transform: rotate(0deg);
   }

   100% {
      transform: rotate(360deg);
   }
}

@keyframes fadeIn {
   from {
      opacity: 0;
      transform: translateY(10px);
   }

   to {
      opacity: 1;
      transform: translateY(0);
   }
}

/* Footer */
.site-footer {
   margin-top: auto;
   padding-top: 4rem;
   color: #999;
   font-size: 0.85rem;
   display: flex;
   justify-content: center;
   gap: 10px;
   text-align: center;
}

.site-footer a {
   color: #666;
   text-decoration: none;
}

.site-footer a:hover {
   text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
   .site-container {
      padding: 1rem;
   }

   .site-header h1 {
      font-size: 2rem;
   }

   .btn-group {
      flex-direction: column;
   }

   .btn-download,
   .btn-proxy {
      flex: none;
   }
}